From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 07C31BBAF for ; Mon, 9 Mar 2009 14:03:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiUEAKqwtEnCpx6vgWdsb2JhbACMcYg7AQEWIrsxhAUG X-IronPort-AV: E=Sophos;i="4.38,329,1233529200"; d="scan'208";a="25283886" Received: from smtpka.univ-orleans.fr (HELO ka.univ-orleans.fr) ([194.167.30.175]) by mail1-smtp-roc.national.inria.fr with ESMTP; 09 Mar 2009 14:03:14 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by ka.univ-orleans.fr (Postfix) with ESMTP id 2D91C12AE0B; Mon, 9 Mar 2009 14:03:12 +0100 (CET) Received: from [192.168.1.126] (unknown [213.144.210.93]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 2E88236E60; Mon, 9 Mar 2009 14:03:14 +0100 (CET) Subject: Re: [Caml-list] how can I express empty element? From: David Rajchenbach-Teller To: Su Zhang Cc: caml-list@yquem.inria.fr In-Reply-To: References: Content-Type: text/plain; charset=utf-8 Date: Mon, 09 Mar 2009 14:03:37 +0100 Message-Id: <1236603817.18569.4.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ens-lyon:01 cheers:01 ocaml:01 beginner's:01 ocaml:01 bug:01 univ-orleans:01 lifo:01 2009:98 beginners:01 wrote:01 caml-list:01 caml-list:01 constructor:01 bin:01 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). Cheers, David 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: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller « Ce matin Un crétin A tué un chercheur. » (air connu) Latest News of French Research: System being liquidated. Researchers angry.