Skip to content

Instantly share code, notes, and snippets.

@wodor
Last active August 29, 2015 13:59
Show Gist options
  • Select an option

  • Save wodor/10485906 to your computer and use it in GitHub Desktop.

Select an option

Save wodor/10485906 to your computer and use it in GitHub Desktop.
%% initial_state return {ok, State} or {error, State}
%% before
play(Context) ->
play(Context, initial_state(Context)).
%% after
play(Context) ->
{ok, State} = initial_state(Context),
play(Context, {ok, State}).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment