Skip to content

Instantly share code, notes, and snippets.

@Xodarap
Created May 25, 2011 01:06
Show Gist options
  • Save Xodarap/990118 to your computer and use it in GitHub Desktop.
Save Xodarap/990118 to your computer and use it in GitHub Desktop.
Infinite YC application
fact genFact n = if n == 1 then 1
else n * (
if (n-1) == 1 then 1
else (n-1) * (
if (n-2) == 1 then 1
else (n-2) * (
if (n-3) == 1 then 1
else (n-3) * (
...
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment