Skip to content

Instantly share code, notes, and snippets.

@jamiecurle

jamiecurle/adder.ex

Created Apr 16, 2016
Embed
What would you like to do?
most basic adding GenServer in Elixir
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
You can’t perform that action at this time.