Skip to content

Instantly share code, notes, and snippets.

@ponkore
Created December 29, 2013 12:33
Show Gist options
  • Save ponkore/8169960 to your computer and use it in GitHub Desktop.
Save ponkore/8169960 to your computer and use it in GitHub Desktop.
F# で fact
let fact n =
let rec f n acc = if n <= 0 then acc else f (n - 1) (acc * n)
f n 1;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment