[erlang-questions] How can I make a list of this
Sean Cribbs
seancribbs@REDACTED
Tue Aug 18 20:31:52 CEST 2015
Can you give us an example of how you got the list of exports? That is, did
you do something other than the below?
Module:module_info(exports)
Note that the Function/Arity notation is not a regular Erlang term, but
becomes {Function, Arity} in the return value from module_info/1.
On Tue, Aug 18, 2015 at 1:13 PM, Roelof Wobben <r.wobben@REDACTED> wrote:
> Hello,
>
> Im still trying to solve exercise 2 of chapter 8 of Programming erlang.
>
> Now I succeed in finding all functions that are exported by a module.
>
> I see now this output :
>
> [{get_rc,0}, {close,1}, {peername,1}, {setpeername,2}, {peernames,...},
> {...}|...], [{module,2},{module_info,0},{module_info,1}],
> [{new,0},{is_set,1},{size,...},{...}|...],
> [{server,3},{interfaces,...},{...}|...], [{init_it,...},{...}|...],
> [{...}|...], [...]|...]
>
> So I have list which are containing more list which contains one of more
> tuples
>
> Is it possible to convert this to for example [get_rc/0, peername/1,
> peernames/? , module/2 ]
>
> I tried with lists:flatten( name_of_list) but that one do not give me the
> right output.
>
> I need the nice output because I have to sort them and then count them.
>
> Roelof
>
>
> ---
> Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
> https://www.avast.com/antivirus
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150818/d26cf85b/attachment.htm>
More information about the erlang-questions
mailing list