From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id B7D38BC48 for ; Thu, 28 Apr 2005 20:23:20 +0200 (CEST) Received: from ptb-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j3SINK6J023096 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 28 Apr 2005 20:23:20 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay04.plus.net with esmtp (Exim) id 1DRDfT-0004sW-PY for caml-list@yquem.inria.fr; Thu, 28 Apr 2005 19:23:19 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Changes on equality between 3.06 and 3.08.3 Date: Thu, 28 Apr 2005 19:23:14 +0100 User-Agent: KMail/1.7.1 References: <20050428100252.GF31263@lami.univ-evry.fr> <4271122F.5090705@barettadeit.com> <20050428.190637.07633836.oandrieu@nerim.net> In-Reply-To: <20050428.190637.07633836.oandrieu@nerim.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504281923.14498.jon@ffconsultancy.com> X-Miltered: at concorde with ID 42712A18.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 andrieu:01 baretta:01 behaves:01 bool:01 pervasives:01 bool:01 ocaml:01 frog:98 wrote:01 equality:01 closures:01 defined:02 caml:02 objective:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Thursday 28 April 2005 18:06, Olivier Andrieu wrote: > > Alex Baretta [Thu, 28 Apr 2005]: > > Actually, an interesting question related to this one is why the > > following line behaves as it does. > > > > # (==) (==) (==);; > > - : bool = false > > Probably because == is defined by an "external" in pervasives.ml, not > a regular function definition. So here, when you use (==), you're > building three closures. # let f = (==) in (==) f f;; - : bool = true Interesting. I don't like it, but it's interesting. :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists