Rbtrees:rb_partial_map/4 definition

The description of rb_partial_map/4 is missing something in the sentence " Fails if or if call(G,Val0,ValF) is not satisfiable for all Val0." (Also, I presume this should be “for all Val0 in Keys”)

Also, rb_partial_map/4 fails if the keys aren’t ordered – is this intended behavior? (The documentation states that keys are assumed to not be repeated).

(Context: I’m doing a bit of cleanup on library(rbtrees) and writing some “smoke tests” to make sure I don’t mess things up)

1 Like

This code comes from YAP. I once wrote the docs. I don’t recall what I picked up from the YAP docs and what I tried to get from the source. I’m afraid I can do the same as you: read the source. Looks like it is doing more or less the same as convlist/3 for rbtrees.