As mentioned in my previous post, I'd like to have weak functional maps. Keeping it simple, suppose the maps are implemented as binary search trees of key/value pairs where pairs are wrapped in an ephemeron: module Eph = Ephemeron.K1 type key = ... (* something boxed and ordered *) type 'a bst = | Empty | Node of {left : 'a bst; pair : (key,'a) Eph.t; right : 'a bst} Cheating a little with pattern matching, if {left; pair=(Some k, Some v); right} is an entry in a tree and I subsequently drop all references to k, then my understanding is that following gc, both options will become None. If I then encounter that node when looking for some k', I'm forced to merge the left and right subtrees before continuing. The question is, why does gc clobber the key in the ephemeron? Why not provide the key when the ephemeron is created and collect the key when the ephemeron is collected? For the above use-case, it would mean that one could still search the tree and defer cleaning up the bst until later. Lindsay -- Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list https://inbox.ocaml.org/caml-list Forum: https://discuss.ocaml.org/ Bug reports: http://caml.inria.fr/bin/caml-bugs