From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA10639; Sat, 26 Jun 2004 15:36:41 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA09641 for ; Sat, 26 Jun 2004 15:36:40 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5QDabSH002765 for ; Sat, 26 Jun 2004 15:36:38 +0200 Received: from [192.168.1.200] (ppp217-185.lns1.syd3.internode.on.net [203.122.217.185]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i5QDaXHY064252; Sat, 26 Jun 2004 23:06:34 +0930 (CST) Subject: Re: [Caml-list] Pattern matching over elements at the front of a container From: skaller Reply-To: skaller@users.sourceforge.net To: Jon Harrop Cc: caml-list In-Reply-To: <200406261215.26971.postmaster@jdh30.plus.com> References: <200406261215.26971.postmaster@jdh30.plus.com> Content-Type: text/plain Message-Id: <1088256992.1941.139.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 26 Jun 2004 23:36:33 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40DD7BE5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 9660:01 glebe:01 ocaml:01 nsw:01 snail:02 checkout:02 2037:03 wrote:03 alter:95 suspect:05 variables:06 definition:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 2004-06-26 at 21:15, Jon Harrop wrote: > Also, is it not possible to alter the definition and implementation of OCaml > such that the pattern "(a, a)" is treated as "(a, b) when a=b"? Has this not > been done because the "=" is suspect? Also sometimes it would be nice to be able to introduce variables in patterns: | (a,_,1) with b = 1 | (a,b,0) -> -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners