Press CTRL+C or CMD+C to copy the selected text and close this dialog.
0 people like it.
Like the snippet!
Factorial recursive function using match with pattern.
let rec factorial n =
match n with
| 0 -> 1
| x -> x * factorial (x-1)
printfn "%d", factorial(5)
This web site is created using F# and Suave web server. It is hosted on
Azure and the source code is on GitHub. Contributions
The first version of fssnip.net has been created by
@tomaspetricek back in 2010.
This web site is a new, open-source and contribution-friendly version.