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 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 51766BC6B for ; Thu, 10 Jan 2008 16:20:21 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKrGhUfAXQImh2dsb2JhbACBVo5JAQEBCAopmTE X-IronPort-AV: E=Sophos;i="4.24,267,1196636400"; d="scan'208";a="21096561" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Jan 2008 16:20:21 +0100 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0AFKKEJ001376 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 10 Jan 2008 16:20:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAPbFhUeAArkpjGdsb2JhbACBVo5JAQEBCAQGCQYamSs X-IronPort-AV: E=Sophos;i="4.24,267,1196636400"; d="scan'208";a="5911353" Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41]) by mail2-smtp-roc.national.inria.fr with ESMTP; 10 Jan 2008 16:20:19 +0100 Received: from stratocaster.home (c-71-206-252-35.hsd1.pa.comcast.net [71.206.252.35]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id m0AFKHPM022517 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 10 Jan 2008 10:20:18 -0500 (EST) Received: from ecc by stratocaster.home with local (Exim 4.68) (envelope-from ) id 1JCzCb-0000aG-Qz for caml-list@inria.fr; Thu, 10 Jan 2008 10:20:17 -0500 Date: Thu, 10 Jan 2008 10:20:17 -0500 From: Eric Cooper To: caml-list@inria.fr Subject: Re: [Caml-list] Annoying behaviour of OCaml Message-ID: <20080110152017.GA513@stratocaster.home> Mail-Followup-To: caml-list@inria.fr References: <4786312A.1050003@functionality.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4786312A.1050003@functionality.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Miltered: at discorde with ID 478637B4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 10,:98 wrote:01 caml-list:01 int:01 int:01 behaviour:01 unexpected:03 shorter:04 thu:05 indeed:07 annoying:08 supposedly:11 but:14 cooper:14 On Thu, Jan 10, 2008 at 02:52:26PM +0000, Thomas Fischbacher wrote: > compare [|1;2;3|] [|4;5|];; (* ...but actially is not: this gives 1, > supposedly because the second list is > shorter than the first. > *) This is indeed unexpected behavior: # compare "123" "45";; - : int = -1 # compare [1;2;3] [4;5];; - : int = -1 # compare [|1;2;3|] [|4;5|];; - : int = 1 -- Eric Cooper e c c @ c m u . e d u