Created
May 11, 2016 15:31
-
-
Save Devalo/e12456fee19fd7c0ecb9f311c5e5bce1 to your computer and use it in GitHub Desktop.
This file contains 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 NaturalNums do | |
def print(1), do: IO.puts(1) | |
def print(n) do | |
print(n - 1) | |
IO.puts(n) | |
end | |
end |
ciaran
commented
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment