-module(implode).
-export([t1/2,t2/2,t3/2]).

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

t2([H|T], Sep) ->
    Joined = [ [Sep|X] || X <- T ],
    lists:flatten([H|Joined]).

t3(List, Sep) ->
    lists:foldr(fun(X,[]) -> X; (X,Acc) -> X++Sep++Acc end, "", List).




