-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).
binary / erlang / join / join binary list / join list of binaries / joining / joining binary list / joining list of binaries / list of binaries