Created
March 12, 2014 11:26
-
-
Save dnet/9505053 to your computer and use it in GitHub Desktop.
Erlang workshop code from 2013-11-21 see http://hsbp.org/erlang#Workshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(teszt). | |
-export([init/1, handle_call/3, q/1, init/0]). | |
-behaviour(gen_server). | |
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