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: -- (:)
From: Martin Jambon <martin_jambon@e...>
Subject: [Caml-list] Map + Set

I need a functional data structure that has a decent efficiency (i.e.
not lists) and can represent `sets of named containers' so that I can
find a container in a set, remove it from the set, update it and put it
back into the set.
Normally the Map module should be suitable, but it doesn't
provide set operations over the keys (union, inter, diff, ...).
The Set module is almost enough except that it doesn't provide a find

val find : elt -> t -> elt  (* yes! *)

Finally I just copy-pasted set.mli and and inserted a find
function... but is there a better solution?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: