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
[Caml-list] Map + Set
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-26 (10:54)
From: Matthieu Sozeau <mattam@a...>
Subject: Re: [Caml-list] Map + Set
On Sun, Jul 25, 2004 at 12:01:03PM -0500, Brian Hurt wrote:
> On Sun, 25 Jul 2004, Martin Jambon wrote:
> A better interface might be:
> val find: (elt -> int) -> t -> elt

Why an int ? Isn't a boolean enough ?
> There is a lot of functionality I'd like to be able to add to map and set.  
> I find myself reimplementing them on a regular basis myself (and no, I
> haven't thought of a better solution).  

Apart from "val of_list : elt list -> t" (a one liner) and the find
function (a fold with an exception or using `exists` and keeping a
reference, which indicates, I think, that it should be implemented 
directly in, i don't remember truly missing functions. 
What are those ?

> Many people on this list don't like modules, however.

That seems like a weird opinion to me, and mine is that most OCaml hackers
are really caml hackers who don't want to know about the OO part.
"Are you sure you're not an encyclopedia salesman?"
No, Ma'am.  Just a burglar, come to ransack the flat."
-- Monty Python