From: Walter Cazzola <cazzola@dico.unimi.it>
To: Pierre Chopin <pierre@punchup.com>
Cc: OCaML Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] still puzzled on generic types
Date: Thu, 29 Sep 2011 17:32:58 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1109291732150.4431@surtur.dico.unimi.it> (raw)
In-Reply-To: <ECCFE43B-CB21-4541-917D-D42FF98F098B@punchup.com>
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
--
prev parent reply other threads:[~2011-09-29 15:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 15:07 Walter Cazzola
2011-09-29 15:16 ` David Allsopp
2011-09-29 15:29 ` Walter Cazzola
2011-09-29 19:04 ` David Allsopp
2011-09-29 15:20 ` Pierre Chopin
2011-09-29 15:32 ` Walter Cazzola [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1109291732150.4431@surtur.dico.unimi.it \
--to=cazzola@dico.unimi.it \
--cc=caml-list@inria.fr \
--cc=pierre@punchup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox