Created
February 2, 2016 14:10
-
-
Save eibrahim/ffe60887743f6305f296 to your computer and use it in GitHub Desktop.
Factorial
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
def factorial 0 do 1 end | |
def factorial n do n * factorial(n-1) end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment