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.2 required=5.0 tests=AWL,MAILTO_TO_SPAM_ADDR autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E99B7BC6B for ; Sat, 4 Aug 2007 16:58:37 +0200 (CEST) Received: from bsd4.nyct.net (mail-out8.nyct.net [216.139.141.8]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74Ewabo008428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 4 Aug 2007 16:58:37 +0200 Received: from [192.168.42.2] (adsl-216-139-154-52.nyct.net [216.139.154.52]) by bsd4.nyct.net (8.13.4/8.13.4) with ESMTP id l74EwYxV092773; Sat, 4 Aug 2007 10:58:35 -0400 (EDT) (envelope-from bhurt@spnz.org) Date: Sat, 4 Aug 2007 11:09:21 -0400 (EDT) From: Brian Hurt X-X-Sender: bhurt@localhost To: tmp123@menta.net Cc: ocaml ml Subject: Re: [Caml-list] Sorted list In-Reply-To: <46B48F3C.1040904@menta.net> Message-ID: References: <46B4485B.7040406@menta.net> <46B454ED.700@philippewang.info> <1186226538.14440.105.camel@rosella.wigram> <46B48F3C.1040904@menta.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at discorde with ID 46B4941C.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 elt:01 sugestion:01 semantics:01 ocaml:01 ocaml:01 2007,:98 wrote:01 wrote:01 maintainers:01 caml-list:01 data:02 modules:02 seems:03 element:03 On Sat, 4 Aug 2007, tmp123@menta.net 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. > > Please, has someone any sugestion? Neither set nor map gives you the semantics you need. Map is probably closer, but it doesn't give you the find minimal element. Unortunately, the standard Ocaml solution in a situation like this is to implement your own data structure. The good news is that this is easy. The bad news is that, because this is easy, there is little pressure on the maintainers of Ocaml to add features to the core library. Brian