From: Laurent Le Brun <laurentlb@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] how can I express empty element?
Date: Mon, 9 Mar 2009 17:07:50 +0100 [thread overview]
Message-ID: <1bb08f400903090907h5bdcf855p926016f2ee195077@mail.gmail.com> (raw)
In-Reply-To: <49B51619.9010306@lri.fr>
On Mon, Mar 9, 2009 at 2:14 PM, AUGER Cedric <sedrikov@gmail.com> wrote:
> David Rajchenbach-Teller wrote:
>>
>> No, that's not possible. :: is an algebraic constructor, which means,
>> among other things, that it accepts no neutral element (well, except
>> when the list is infinite, but that's probably not what you're looking
>> for).
>
> And even if the list is infinite, I don't see any way to do it;
let rec li = 1 :: li
1 can be considered as a neutral element, since li = 1 :: li (of
course, the "=" function doesn't return, but the two lists have the
same elements).
--
Laurent
next prev parent reply other threads:[~2009-03-09 16:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 3:59 Su Zhang
2009-03-09 13:03 ` [Caml-list] " David Rajchenbach-Teller
2009-03-09 13:14 ` AUGER Cedric
2009-03-09 16:07 ` Laurent Le Brun [this message]
2009-03-10 8:47 ` Grünewald Michaël
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=1bb08f400903090907h5bdcf855p926016f2ee195077@mail.gmail.com \
--to=laurentlb@gmail.com \
--cc=caml-list@yquem.inria.fr \
/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