Skip to content

Instantly share code, notes, and snippets.

@bsamuels453
Created April 3, 2013 19:43
Show Gist options
  • Save bsamuels453/5304589 to your computer and use it in GitHub Desktop.
Save bsamuels453/5304589 to your computer and use it in GitHub Desktop.
let rec factorial n =
match n with
| n when (n < 1) -> 1
| n -> n * factorial (n-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment