View Problem

Join the elements of a list, separated by commas

Given the list [Apple, Banana, Carrot] produce "Apple, Banana, Carrot"
ExpandDiskEdit
erlang
Result = string:join(Fruit, ", "),
ExpandDiskEdit
erlang
Result = lists:foldl(fun (E, Acc) -> Acc ++ ", " ++ E end, hd(Fruit), tl(Fruit)),
ExpandDiskEdit
erlang
Result = lists:flatten([ hd(Fruit) | [ ", " ++ X || X <- tl(Fruit)]]).

Submit a new solution for erlang
There are 26 other solutions in additional languages (clojure, cpp, csharp, fantom ...)