Skip to content

Instantly share code, notes, and snippets.

@lilliealbert
Created May 19, 2013 04:58
Show Gist options
  • Save lilliealbert/5606742 to your computer and use it in GitHub Desktop.
Save lilliealbert/5606742 to your computer and use it in GitHub Desktop.
def factorial_recursive(n)
return 1 if n == 1
n * factorial_recursive(n-1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment