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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 270E2BBC1 for ; Sun, 27 Apr 2008 19:39:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMAANZWFEjCpx6wlmdsb2JhbACRWgEBAQEJBQgYlwE X-IronPort-AV: E=Sophos;i="4.25,713,1199660400"; d="scan'208";a="10133159" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 Apr 2008 19:39:50 +0200 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id E09C512B3DC; Sun, 27 Apr 2008 19:39:50 +0200 (CEST) Received: from [192.168.1.108] (APoitiers-256-1-82-157.w90-11.abo.wanadoo.fr [90.11.21.157]) by smtps.univ-orleans.fr (Postfix) with ESMTP id C742F36E5B; Sun, 27 Apr 2008 19:39:53 +0200 (CEST) Subject: Re: [Caml-list] [OSR] Standard syntax extensions ? From: David Teller To: Arthur Chan Cc: Till Crueger , Richard Jones , Caml In-Reply-To: <74cabd9e0804261432o116f4db5w2f5777496da17d94@mail.gmail.com> References: <1209052182.6180.35.camel@Blefuscu> <74cabd9e0804251337m40811532yb359710630cdbdfd@mail.gmail.com> <20080426074157.GA15640@annexia.org> <74cabd9e0804261432o116f4db5w2f5777496da17d94@mail.gmail.com> Content-Type: text/plain Date: Sun, 27 Apr 2008 19:41:08 +0200 Message-Id: <1209318068.6128.10.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; syntax:01 univ-orleans:01 ocaml:01 arrays:01 cheers:01 syntax:01 univ-orleans:01 lifo:01 liquidations:98 wrote:01 caml-list:01 minor:01 functional:02 python:03 chan:04 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.