English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[OSR] Standard syntax extensions ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-04-27 (17:39)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] [OSR] Standard syntax extensions ?
We can do that in OCaml, actually. I've seen at least three versions of
this in the Net, one of them by me. Plus it also works with streams,
arrays, etc.

Cheers,
 David
On Sat, 2008-04-26 at 14:32 -0700, Arthur Chan wrote:
> The python syntax goes further than just the "in" bit, in fact.  They
> can do list comprehensions like [for x in blah if f(x)].  Now every
> functional guru will recognize this immediately as the bastardization
> of List.filter.  While it'd be nice to have that, I come across
> List.filter much less than List.exists/mem.
> 
> Whatever....  it's just a minor quibble, but this thread was about
> syntax extensions, after all.

-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations.