[erlang-questions] how to make the comprehension work

Roelof Wobben r.wobben@REDACTED
Mon Aug 17 19:57:19 CEST 2015


Op 17-8-2015 om 19:42 schreef Lukas Winkler:
> On 17 August 2015 at 19:32, Garrett Smith <g@REDACTED> wrote:
>> On Mon, Aug 17, 2015 at 12:22 PM, Roelof Wobben <r.wobben@REDACTED> wrote:
>>> Op 17-8-2015 om 19:17 schreef Lukas Winkler:
>>>> On 17 August 2015 at 19:14, Roelof Wobben <r.wobben@REDACTED> wrote:
>>>>> Hello,
>>>>>
>>>>> I try to extract the modules names from the output of code:loaded_all.
>>>>>
>>>>> So I tried this :
>>>>>
>>>>> -module(module).
>>>>>
>>>>> -export([most_used_function_name/0]).
>>>>>
>>>>> most_used_function_name() ->
>>>>>      process_module_data(code:all_loaded()).
>>>>>
>>>>> process_module_data(Loaded_modules)  ->
>>>>>       Module_list = get_modules_name(Loaded_modules).
>>>>>
>>>>> get_modules_name(Loaded_Modules_list) ->
>>>>>       [ModuleList || [{ModuleList, _}] <- Loaded_Modules_List ].
>>>>
>>>> Friendly reminder that we are not your compiler. Count the ]....
>>>>
>>>> -winlu
>>>>
>>> I know that. If I count the [ I see 2  and ] I see also 2.
>> He he - no, it's not that.
> True, I jumped to the first error that my eyes saw, which is not what
> the compile error was. Still if you ever manage to solve the unbound
> error you already have a clue where the next problem might be.
>
> -winlu
I solved that one. Next problem is why the outcome is a empty list.
So time to use some io:format ,

Roelof



---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
https://www.avast.com/antivirus




More information about the erlang-questions mailing list