Skip to content

Instantly share code, notes, and snippets.

Created March 12, 2014 11:26
What would you like to do?
Erlang workshop code from 2013-11-21 see
-export([init/1, handle_call/3, q/1, init/0]).
init() ->
gen_server:start_link(?MODULE, [], []).
q(Pid) -> gen_server:call(Pid, q).
init([]) -> {ok, 0}.
handle_call(q, _, N) -> {reply, N, N + 1}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment