[erlang-questions] Proposed addition to gb_trees
Fri Nov 27 18:55:35 CET 2015
On Fri, Nov 27, 2015 at 6:14 AM, Richard A. O'Keefe <ok@REDACTED> wrote:
> (2) What should happen if the key is not present in the
> tree? gb_trees as its stands has an interface I
> find complex because practically everything occurs
> in two or three copies: assume key present, assume key
> absent, allow for either possibility. Assuming it's
> absent doesn't make sense here, because there'd be
> nothing to pass to Fun. But that leaves two copies,
> one which would err if the key was absent and the other
> which would just not change the tree.
It should take an optional initializer parameter, like for example the
corresponding function in Racket.
More information about the erlang-questions