[erlang-questions] join/2 function

Hoan Ton-That hoan@REDACTED
Sat Dec 16 13:44:56 CET 2006


Hey,

I think that the following function join should
be included in the lists module.

join(Sep, List) ->
  lists:foldl(fun(A, "") -> A; (A, Acc) -> Acc ++ Sep ++ A end, "", List).

Hoan





More information about the erlang-questions mailing list