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=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,MAILTO_TO_SPAM_ADDR,NO_REAL_NAME 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 8C663BC6B for ; Sat, 4 Aug 2007 16:33:31 +0200 (CEST) Received: from resmaa06.ono.com (smtp.ono.com [62.42.230.12]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74EXVnb018141 for ; Sat, 4 Aug 2007 16:33:31 +0200 Received: from [192.168.1.33] (83.34.178.87) by resmaa06.ono.com (7.3.118.8) (authenticated as tmp123@menta.net) id 46AEFB3F001A7948; Sat, 4 Aug 2007 16:28:05 +0200 Message-ID: <46B48CEE.6030606@menta.net> Date: Sat, 04 Aug 2007 16:27:58 +0200 From: tmp123@menta.net User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Philippe Wang Cc: ocaml ml Subject: Re: [Caml-list] Sorted list References: <46B4485B.7040406@menta.net> <46B454ED.700@philippewang.info> <1186226538.14440.105.camel@rosella.wigram> <46B46FB3.3090606@philippewang.info> In-Reply-To: <46B46FB3.3090606@philippewang.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46B48E3B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 elt:01 functor:01 sig:01 val:01 wrote:01 wrote:01 caml-list:01 int:01 modules:02 seems:03 seems:03 module:03 problem:05 problem:05 Philippe Wang wrote: > skaller wrote: > >> On Sat, 2007-08-04 at 12:29 +0200, Philippe Wang wrote: >> >> >>> tmp123@menta.net wrote: >>> >> >> >> >> >>>> Of the standard modules, the most similar seems "set", because >>>> allows insertion and has the funcion "min_elt". However, the >>>> problem is, if two timers have the same time, addition of the >>>> second one removes the first. >>>> >>>> >>> >>> Hello, >>> >>> Let's remind that Set.Make is a functor that takes a module with >>> sig >>> type t >>> val compare : t -> t -> int >>> end >>> >>> If you simply give him a compare function that never returns 0, then >>> you can add multiple elements that are the same. >>> >> >> >> You cannot do that! compare function must be a total order. >> > > Why not ? > > Hello, Thanks for your help. The problem with this option seems to be in the deletion of the set elements. It is not posible to use "Set.remove", because the compare function never returns "equal". Kind regards.