Browse thread
how can I express empty element?
-
Su Zhang
-
David Rajchenbach-Teller
-
AUGER Cedric
- Laurent Le Brun
- Grünewald_Michaël
-
AUGER Cedric
-
David Rajchenbach-Teller
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Laurent Le Brun <laurentlb@g...> |
| Subject: | Re: [Caml-list] how can I express empty element? |
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