Browse thread
Sorted list
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Brian Hurt <bhurt@s...> |
| Subject: | Re: [Caml-list] Sorted list |
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