On Thu, 29 Sep 2011, Pierre Chopin wrote:
You need to explicitly name the optional arguments you are passing,
otherwise the interpreter thinks you are trying to pass l, which should be 'a
list :
let rec enumerate ?(l'=[]) ?(n=0) l =
match l with
h::l1 -> enumerate ~l':(l'@[(n,h)]) ~n:(n+1) l1
| [] -> l'
great point, you are right (what a silly error), thanks a lot.
Walter
--
--
Caml-list mailing list. Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs