Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Sorted list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-04 (14:58)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] Sorted list

On Sat, 4 Aug 2007, wrote:

> skaller wrote:
>  On Sat, 2007-08-04 at 12:29 +0200, Philippe Wang wrote:
> 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.