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: | Grünewald_Michaël <michaelgrunewald@y...> |
| Subject: | Re: [Caml-list] how can I express empty element? |
Le 9 mars 09 à 14:14, AUGER Cedric a écrit : > > 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; > but you can always define: If `l' is only infinite list with type `unit list', then `l' is a neutral element for `::' constructor, but only for `unit list'. (Well, that is reminiscent of your favourite «consider a topological space with two points, one open and one closed»-example, but I did not find a better one!) -- Cheers, Michaël G.