binary / erlang / join / join binary list / join list of binaries / joining / joining binary list / joining list of binaries / list of binaries
Juntando-se a uma lista de binários em Erlang
-spec binary_join(List :: list(binary()), Separator :: binary()) -> binary().binary_join(List, Separator) -> lists:foldl(fun(Item, Acc) -> if bit_size(Acc) > 0 -> <<Acc/binary, Separator/binary, Item/binary>>; true -> Item end end, <<>>, List).
Continuar lendo