No way to retrieve the base of a Set or Map in O(1)

André van Delden andre.van.delden at uni-bremen.de
Thu Jun 18 10:27:32 UTC 2015


Hello,

there seems to be no way to retrieve the base of a Set or Map in O(1),
since there is no relevant function in the respective libraries and the
constructors Bin and Tip are not exported in any module.
I think retrieving any one element from a Set or Map might be useful
sometimes, so I modestly ask for an implementation.

I see that there is splitRoot, but the docs advice, not to rely on the
current form of the resulting list, since it might be subject to
change.
Having this function, with its current result, it might be interesting
to be able to efficiently build the union of the lower and the upper
parts by simply connecting the trees at their bases.

What do you think?

Kind regards,
André



More information about the Libraries mailing list