Let rec binding
# let rec fact x = if x = 0 then 1 else x * fact(x - 1) ;;
val fact : int -> int =
# fact (x + 1);;
- : int = 24
Previous slide
Next slide
Back to first slide
View graphic version