Skip to content

Instantly share code, notes, and snippets.

@treejamie
Created April 16, 2016 10:39
Show Gist options
  • Save treejamie/4cf8eea1da5903096c07ef8809335e1c to your computer and use it in GitHub Desktop.
Save treejamie/4cf8eea1da5903096c07ef8809335e1c to your computer and use it in GitHub Desktop.
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