Add test rec_factorial (computes 7!) -- fails

This commit is contained in:
Théophile Bastian 2018-02-16 01:09:21 +01:00
parent ca790364b6
commit 6f75134474
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1 @@
5040

View file

@ -0,0 +1,9 @@
let rec fact = fun n ->
ifzero n then
1
else
let sub_val = fact (n - 1) in
n * sub_val
in
print (fact 7)