From: "Chris King" <colanderman@gmail.com>
To: "Brian Hurt" <bhurt@janestcapital.com>
Cc: "Sam Steingold" <sds@gnu.org>, caml-list@inria.fr
Subject: Re: [Caml-list] List.cons and "::"
Date: Tue, 17 Jul 2007 16:46:34 -0400 [thread overview]
Message-ID: <875c7e070707171346w43610622qbb918860b2573b53@mail.gmail.com> (raw)
In-Reply-To: <469D235E.9000008@janestcapital.com>
On 7/17/07, Brian Hurt <bhurt@janestcapital.com> wrote:
> I wouldn't recommend it, but you could.
> :: and , you can't override.
Actually,
# type foo = :: of int * int;;
# 1 :: 2;;
- : foo = :: (1, 2)
:) This is because :: is considered a constructor, and not just
syntax (as is , or []).
But in general automatic currying of constructors would be nice (I
think Haskell does this). There is probably some technical reason why
it's not a good idea in O'Caml though.
- Chris
next prev parent reply other threads:[~2007-07-17 20:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 20:02 Sam Steingold
2007-07-17 20:15 ` [Caml-list] " Brian Hurt
2007-07-17 20:38 ` Martin Jambon
2007-07-17 22:02 ` code17
2007-07-17 20:46 ` Chris King [this message]
2007-07-18 21:36 ` [Caml-list] " Pierre Etchemaïté
2007-07-17 22:33 ` Jon Harrop
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=875c7e070707171346w43610622qbb918860b2573b53@mail.gmail.com \
--to=colanderman@gmail.com \
--cc=bhurt@janestcapital.com \
--cc=caml-list@inria.fr \
--cc=sds@gnu.org \
/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