I copied a recursive list matching function from a slide of an introductory ocaml course.
let rec fac n = match n with
0 -> 1
| _ -> n * fac(n-1);;
fac 3;;
I get: "Error: Unbound value fac"
Why is this?
I copied a recursive list matching function from a slide of an introductory ocaml course.
let rec fac n = match n with
0 -> 1
| _ -> n * fac(n-1);;
fac 3;;
I get: "Error: Unbound value fac"
Why is this?
Using M-X tuareg-eval-buffer in emacs gives:
You probably run M-X tuarge-eval-region with only the
fac 3
selected so the function was never defined.