Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Created May 17, 2015 18:33
Show Gist options
  • Select an option

  • Save StoneCypher/2e1f249cd4e272905007 to your computer and use it in GitHub Desktop.

Select an option

Save StoneCypher/2e1f249cd4e272905007 to your computer and use it in GitHub Desktop.
state_loop(State) ->
receive
{change_state, NewState} -> state_loop(NewState);
{get_state, Sender} -> Sender ! {current_state, State}, state_loop(State);
stop_looping_jerk -> {ok, sadface}
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment