[erlang-questions] how: Another library flatten function?
Fri Feb 26 16:50:28 CET 2010
You can write your own:
f(, A) ->
f([L|_]=I, A) when is_number(L) ->
[I | A];
f([H|Tail], A) ->
f(Tail, f(H, A)).
Bengt Kleberg wrote:
> I have the following list: ["asd",[["Flow","kalle"]],["Sub","F"]]
> I would like to flatten it to: ["asd","Flow","kalle","Sub","F"]
> lists:flatten/1 is too effective. It gives me: "asdFlowkalleSubF"
> Is there another flatten somewhere?
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
More information about the erlang-questions