Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
0 people like it. Like the snippet!
Factorial recursive function using match with pattern.
1: 2: 3: 4: 5: 6:
let rec factorial n = match n with | 0 -> 1 | x -> x * factorial (x-1) printfn "%d", factorial(5)