caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Map + Set
@ 2004-07-25  8:17 Martin Jambon
  2004-07-25 16:26 ` Matt Gushee
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Martin Jambon @ 2004-07-25  8:17 UTC (permalink / raw)
  To: caml-list

Hi,

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
function:

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

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


Martin

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-07-28  8:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-25  8:17 [Caml-list] Map + Set Martin Jambon
2004-07-25 16:26 ` Matt Gushee
2004-07-25 17:01 ` Brian Hurt
2004-07-26 10:40   ` Matthieu Sozeau
2004-07-26 15:25     ` Brian Hurt
2004-07-26 15:47       ` Martin Jambon
2004-07-26 16:26         ` Brian Hurt
2004-07-26  7:43 ` Diego Olivier Fernandez Pons
2004-07-26 16:24   ` Martin Jambon
2004-07-26 16:52     ` Diego Olivier Fernandez Pons
2004-07-27 21:45   ` [Caml-list] Camlp4 help/questions Josh Smith
2004-07-27 22:11     ` Brian Hurt
2004-07-28  1:15       ` Josh Smith
     [not found]     ` <200407272307.50167.jon@jdh30.plus.com>
2004-07-28  1:38       ` Josh Smith
2004-07-28  8:03     ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).