'zip' in Erlang -
I'm wondering if the standart erlang library has a ready implementation of zip-functions. Something like this:
Zip ([H1 | T1], [H2 | T2], ACC) - & gt; ZIP (T1, T2, AC ++ [{H1, H2}]); Zip ([], [], ACC) - & gt; ACC
In the list module there is one:
Gt; Lists: zip ([A, B, C], [1,2,3]) [{A, 1}, {b, 2}, {c, 3}]
Comments
Post a Comment