Skip to content

Instantly share code, notes, and snippets.

@tmountain
Created November 17, 2017 15:42
Show Gist options
  • Save tmountain/9ae7a6c2f67785ef5a593c2560a7e132 to your computer and use it in GitHub Desktop.
Save tmountain/9ae7a6c2f67785ef5a593c2560a7e132 to your computer and use it in GitHub Desktop.
almostFactorial = (\f -> (\n -> if n == 0 then 1 else n * f (n - 1)))
facA = almostFactorial facA
facA 3 -- returns 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment