Skip to content

Instantly share code, notes, and snippets.

@glesica
Created May 22, 2015 19:56
Show Gist options
  • Save glesica/51e2fa379e9c0105c302 to your computer and use it in GitHub Desktop.
Save glesica/51e2fa379e9c0105c302 to your computer and use it in GitHub Desktop.
defmodule Units do
def add({x, :in}, {y, :in}), do: {x + y, :in}
def sub({x, :in}, {y, :in}), do: {x - y, :in}
end
Units.add({5, :in}, {4, :in})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment