summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOscar <oscar.franzen@gmail.com>2014-10-18 11:44:44 +0800
committerOscar <oscar.franzen@gmail.com>2014-10-18 11:44:44 +0800
commitb2cb538a5a758ce03a219545a77b274cd8609cc4 (patch)
tree149bfbd7e6f130e792a203a2fb66fba53644d6c8
parent8e723a5f456403911b512c92979c9417a972406c (diff)
Recursive function a little bit to recursive
Infinitely recursive
-rw-r--r--ocaml.html.markdown2
1 files changed, 1 insertions, 1 deletions
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 *)