Skip to content

Instantly share code, notes, and snippets.

@Liru
Last active December 27, 2017 22:04
Show Gist options
  • Save Liru/7a9cb3689bda7550ca5f5d8a9f5b1af7 to your computer and use it in GitHub Desktop.
Save Liru/7a9cb3689bda7550ca5f5d8a9f5b1af7 to your computer and use it in GitHub Desktop.
defmodule Exercise do
def gcd(x, 0), do: x
def gcd(x, y) do
IO.puts("gcd(#{x}, #{y})")
gcd(y, rem(x,y))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment