Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
how can I express empty element?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Rajchenbach-Teller <David.Teller@e...>
Subject: Re: [Caml-list] how can I express empty element?
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


On Sun, 2009-03-08 at 22:59 -0500, Su Zhang wrote:
> Hi all,
> I have a question on ocaml, is there a way to write a empty element
> say a which can make a::ax=ax ? I tried to find out in library, yet I
> didn't get the right way out, and it doesn't work if I make a=[], so
> do you know whether there is a technique can realize this function?
> I've got stuck on this point for a very long time.
> thanks
> -- 
> Su Zhang
> PHD Student 
> Computer Information and Science
> Kansas State University 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports:
David Teller-Rajchenbach
 Security of Distributed Systems
   « Ce matin Un crétin A tué un chercheur. » (air connu)
   Latest News of French Research: System being liquidated. Researchers angry.