--spec schema_version() ->
- binary().
-schema_version() ->
- <<"beam_stats_v0">>.
-
--spec bin_join([binary()], binary()) ->
- binary().
-bin_join([] , <<_/binary>> ) -> <<>>;
-bin_join([<<B/binary>> | []] , <<_/binary>> ) -> B;
-bin_join([<<B/binary>> | [_|_]=Bins], <<Sep/binary>>) ->
- BinsBin = bin_join(Bins, Sep),
- <<B/binary, Sep/binary, BinsBin/binary>>.
+-spec list_interleave([A], A) ->
+ [A].
+list_interleave([], _) ->
+ [];
+list_interleave([X], _) ->
+ [X];
+list_interleave([X|Xs], Sep) ->
+ [X, Sep | list_interleave(Xs, Sep)].