[erlang-questions] How can I make a list of this

Roelof Wobben r.wobben@REDACTED
Tue Aug 18 20:13:35 CEST 2015


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




More information about the erlang-questions mailing list