From b2cb538a5a758ce03a219545a77b274cd8609cc4 Mon Sep 17 00:00:00 2001 From: Oscar Date: Sat, 18 Oct 2014 11:44:44 +0800 Subject: [PATCH] Recursive function a little bit to recursive Infinitely recursive --- ocaml.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml.html.markdown b/ocaml.html.markdown index b9505f13..f9db7080 100644 --- a/ocaml.html.markdown +++ b/ocaml.html.markdown @@ -93,7 +93,7 @@ let inc_int (x: int) : int = x + 1 ;; (* You need to mark recursive function definitions as such with "rec" keyword. *) let rec factorial n = if n = 0 then 1 - else factorial n * factorial (n-1) + else n * factorial (n-1) ;; (* Function application usually doesn't need parentheses around arguments *)