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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 69EA5BBAF for ; Mon, 9 Mar 2009 17:07:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQCAPvbtEnRVdypkWdsb2JhbACUbUEBAQkJDAcPrGKBB40mAQMBA4QCBg X-IronPort-AV: E=Sophos;i="4.38,330,1233529200"; d="scan'208";a="24069464" Received: from mail-fx0-f169.google.com ([209.85.220.169]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Mar 2009 17:07:51 +0100 Received: by fxm17 with SMTP id 17so1617522fxm.27 for ; Mon, 09 Mar 2009 09:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tuFDaj4ZjsE1ygWBrqAejZshBNECY7g1hry7w0L/Wdc=; b=jQnjq+rUskHVkEpE+lFRE0RVkEkYeZjLAjJKYqxJZo2uXXU2f7RjeDL4du4eiRqnmQ PRh40Co73lUTnr5HpVfdHGeUeNndGCS2Q2qfv7/dBxi54EnyP8XyB8SIyXEMXTFrXkpk 8KrF6x98pngQky6Ri++zVjlZFRsARH7J75078= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Ty6if9tzbdwEXQOJ8QOHtTyTq1RYcGonid/A7p4LvbOAgR4Zh76FxVFX567o4fK4gS Yy2Q6igBvsQwgQrR8334me+2hd9RPyxtKKufEs4uZ9N6jGqSV42cl/ldJChY99l9UoOL qbygC0J3Ev3hCM3bXyuqKPrHzBe63YTgHYB78= MIME-Version: 1.0 Received: by 10.103.175.8 with SMTP id c8mr2692022mup.117.1236614870720; Mon, 09 Mar 2009 09:07:50 -0700 (PDT) In-Reply-To: <49B51619.9010306@lri.fr> References: <1236603817.18569.4.camel@Blefuscu> <49B51619.9010306@lri.fr> Date: Mon, 9 Mar 2009 17:07:50 +0100 Message-ID: <1bb08f400903090907h5bdcf855p926016f2ee195077@mail.gmail.com> Subject: Re: [Caml-list] how can I express empty element? From: Laurent Le Brun To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; 2009:98 wrote:01 wrote:01 rec:01 caml-list:01 constructor:01 algebraic:03 element:03 element:03 let:03 probably:07 function:08 accepts:09 except:11 cedric:11 On Mon, Mar 9, 2009 at 2:14 PM, AUGER Cedric 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