diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2014-10-17 22:51:33 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2014-10-17 22:51:33 -0500 |
commit | 89fa5e0dabbb91a702b045bcec2ea54ee20d0953 (patch) | |
tree | 149bfbd7e6f130e792a203a2fb66fba53644d6c8 | |
parent | 8e723a5f456403911b512c92979c9417a972406c (diff) | |
parent | b2cb538a5a758ce03a219545a77b274cd8609cc4 (diff) |
Merge pull request #811 from OscarF/patch-1
Recursive function a little bit to recursive
-rw-r--r-- | ocaml.html.markdown | 2 |
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 *) |