Skip to content

Instantly share code, notes, and snippets.

@talentdeficit
Created November 24, 2011 03:09
Show Gist options
  • Save talentdeficit/1390544 to your computer and use it in GitHub Desktop.
Save talentdeficit/1390544 to your computer and use it in GitHub Desktop.
loop([end_json], Acc) -> lists:reverse(Acc);
loop([Event|Events], Acc) -> loop(Events, [Event] ++ Acc);
loop(_, _) -> {error, badjson}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment