From: Siraaj Khandkar Date: Sun, 4 Oct 2015 05:34:46 +0000 (-0400) Subject: Improve spec of list interleave. X-Git-Tag: 1.0.0~5 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e1221e429959c3184223b8e174ceb503e59781ba;p=beam_stats.git Improve spec of list interleave. --- diff --git a/src/beam_stats_msg_graphite.erl b/src/beam_stats_msg_graphite.erl index d33e450..5b8bd43 100644 --- a/src/beam_stats_msg_graphite.erl +++ b/src/beam_stats_msg_graphite.erl @@ -109,8 +109,8 @@ path_prefix(?T{path=Path}=T, <>) -> schema_version() -> <<"beam_stats_v0">>. --spec interleave(iolist(), iodata()) -> - iolist(). +-spec interleave([A], A) -> + [A]. interleave([], _) -> []; interleave([X], _) -> [X]; interleave([X|Xs], Sep) ->