Skip to content

Instantly share code, notes, and snippets.

@jdstanhope
Created August 3, 2010 18:20
Show Gist options
  • Save jdstanhope/506861 to your computer and use it in GitHub Desktop.
Save jdstanhope/506861 to your computer and use it in GitHub Desktop.
Simplistic Factorial in F#
let rec factorial n =
let rec fact n p =
if n = 1 then
r
else
fact (n - 1) (p * n)
fact n 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment