Skip to content

Instantly share code, notes, and snippets.

@ksmithbaylor
Created April 7, 2016 14:05
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 ksmithbaylor/e042f4087af93198976b846598af555d to your computer and use it in GitHub Desktop.
Save ksmithbaylor/e042f4087af93198976b846598af555d to your computer and use it in GitHub Desktop.
def factorial n
(1..n).reduce :* || 1
end
def snake_case_paths size
factorial(2 * size) / factorial(size) ** 2
end
puts snake_case_paths 10
@tadowns
Copy link

tadowns commented Apr 7, 2016

👍

@deep-spaced
Copy link

Epic!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment