Last active
December 27, 2017 22:04
-
-
Save Liru/7a9cb3689bda7550ca5f5d8a9f5b1af7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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