Skip to content

Instantly share code, notes, and snippets.

@eibrahim
Created February 2, 2016 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eibrahim/ffe60887743f6305f296 to your computer and use it in GitHub Desktop.
Save eibrahim/ffe60887743f6305f296 to your computer and use it in GitHub Desktop.
Factorial
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