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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr 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 2E028BC6B for ; Sat, 4 Aug 2007 22:33:42 +0200 (CEST) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74KXflT010843 for ; Sat, 4 Aug 2007 22:33:41 +0200 Received: from poincare.swapping.umh.ac.be (pri-010.umh.ac.be [10.101.0.10]) by hedwig1.umh.ac.be (8.13.6/8.13.6) with ESMTP id l74KckqR1220696; Sat, 4 Aug 2007 22:38:47 +0200 Received: from localhost ([127.0.0.1] ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.67) (envelope-from ) id 1IHQJQ-0000nH-79; Sat, 04 Aug 2007 22:33:24 +0200 Date: Sat, 04 Aug 2007 22:33:23 +0200 (CEST) Message-Id: <20070804.223323.243546432.Christophe.Troestler+ocaml@umh.ac.be> To: lists@philippewang.info Cc: caml-list@inria.fr Subject: Re: [Caml-list] Sorted list From: Christophe TROESTLER In-Reply-To: <46B46FB3.3090606@philippewang.info> References: <46B454ED.700@philippewang.info> <1186226538.14440.105.camel@rosella.wigram> <46B46FB3.3090606@philippewang.info> X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j Organization: University of Mons-Hainaut X-Mailer: Mew version 5.2.50 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at concorde with ID 46B4E2A5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 0200,:01 struct:01 elt:01 bool:01 bool:01 elt:01 cheers:01 wrote:01 caml-list:01 umh:01 On Sat, 04 Aug 2007 14:23:15 +0200, Philippe Wang wrote: > > It works ! ... Or did I miss something ? Do not be satisfied after a quick test! # module S = Set.Make(struct type t = int let compare : t -> t -> int = fun a b -> match compare a b with 0 -> 1 | n -> n end);; # let x = S.add 1 (S.add 1 S.empty);; # S.elements x;; - : S.elt list = [1; 1] # S.mem 1 x;; - : bool = false # S.equal x x;; - : bool = false # S.elements(S.remove 1 x);; - : S.elt list = [1; 1] Is that what you expect? Cheers, ChriS