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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 14B83BBCA for ; Sat, 26 Apr 2008 09:53:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqcBADt8EkiD3AgEiGdsb2JhbACBU5AIAQEBDyCZJA X-IronPort-AV: E=Sophos;i="4.25,710,1199660400"; d="scan'208";a="11958190" Received: from postfix.iai.uni-bonn.de ([131.220.8.4]) by mail3-smtp-sop.national.inria.fr with ESMTP; 26 Apr 2008 09:53:14 +0200 X-IAI-Env-From: : [212.201.70.135] Received: from reitoei.dyndns.info (pptp-212-201-70-135.pptp.stw-bonn.de [212.201.70.135]) by postfix.iai.uni-bonn.de (Postfix) with ESMTP id 7341B5C82B; Sat, 26 Apr 2008 09:53:13 +0200 (MEST) (envelope-from crueger@informatik.uni-bonn.de) (envelope-to VARIOUS) (4) (internal use: ta=1, tu=1, te=1, am=L, au=crueger) Date: Sat, 26 Apr 2008 09:53:12 +0200 To: "Richard Jones" , "Arthur Chan" Subject: Re: [Caml-list] [OSR] Standard syntax extensions ? From: "Till Crueger" Organization: =?iso-8859-15?Q?Universit=E4t_Bonn?= Cc: Caml , "David Teller" Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <1209052182.6180.35.camel@Blefuscu> <74cabd9e0804251337m40811532yb359710630cdbdfd@mail.gmail.com> <20080426074157.GA15640@annexia.org> Content-Transfer-Encoding: Quoted-Printable Message-ID: In-Reply-To: <20080426074157.GA15640@annexia.org> User-Agent: Opera Mail/9.27 (Linux) X-Spam: no; 0.00; syntax:01 0200,:01 'list:01 haskell:01 infix:01 ocaml:01 elegantly:01 wrote:01 wrote:01 caml-list:01 short:01 functional:02 sport:96 programming:03 let:03 On Sat, 26 Apr 2008 09:41:57 +0200, Richard Jones wro= te: > I'm guessing that there will be ambiguity because you're wanting to > add yet another meaning to the reserved word 'in'. > > However I'm not sure why you don't just use 'List.mem', or even: > > let mem =3D List.mem ;; > > mem 1 [1;2;3] Since I am reading the "Haskell School of expressions" right now (to = become better at functional Programming, not to leave my favourite = language :)) I am starting to like the way you can turn any function int= o = an infix operator by using quotes. Wouldn't it be possible to have = something similar to this in OCaml? I don't think there is an easy way t= o = do this yet, since I didn't find anything on this topic. I am posting this in this thread, because this would allow us to write t= he = above more elegantly as: 1 `mem` [1;2;3], which is close to what was originally proposed. What do you think of this? bye, Till -- = There once was a man from the sticks Who liked to compose limericks. But he failed at the sport, For he wrote 'em too short.