Created
April 16, 2016 10:39
-
-
Save treejamie/4cf8eea1da5903096c07ef8809335e1c to your computer and use it in GitHub Desktop.
most basic adding GenServer in Elixir
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
defmodule Adder do | |
use GenServer | |
def handle_call({:add, x, y}, _from, []) do | |
{:reply, x + y, []} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment