Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created September 27, 2011 21:46
Show Gist options
  • Save t0yv0/1246347 to your computer and use it in GitHub Desktop.
Save t0yv0/1246347 to your computer and use it in GitHub Desktop.
[<JavaScript>]
let Factorial (n: int) =
let rec fac n acc =
match n with
| 0 | 1 -> acc
| n -> fac (n - 1) (acc * n)
fac n 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment