chickadee » rb-tree » union-transform

FNMERGE-FN M1 M2procedure

The value of a key in only one map becomes (FN X), and the value of a key in both maps becomes (MERGE-FN X Y). FN and MERGE-FN are called in ascending order of keys. Returns a list (N M KT1 KT2), where N is the number of keys in the new map M. KT1 is a list of (X . NEW-VALUE) pairs that relates each value X of M1 to its value in M, and KT2 is the corresponding list for M2. A key in both maps contributes a pair to both lists. Both lists are in ascending order of keys.