caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Rajchenbach-Teller <David.Teller@ens-lyon.org>
To: Su Zhang <westlifezs@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] how can I express empty element?
Date: Mon, 09 Mar 2009 14:03:37 +0100	[thread overview]
Message-ID: <1236603817.18569.4.camel@Blefuscu> (raw)
In-Reply-To: <e2842950903082059r2497acd6re851fcc229a893c8@mail.gmail.com>

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.


  reply	other threads:[~2009-03-09 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09  3:59 Su Zhang
2009-03-09 13:03 ` David Rajchenbach-Teller [this message]
2009-03-09 13:14   ` [Caml-list] " AUGER Cedric
2009-03-09 16:07     ` Laurent Le Brun
2009-03-10  8:47     ` Grünewald Michaël

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236603817.18569.4.camel@Blefuscu \
    --to=david.teller@ens-lyon.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=westlifezs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).