chickadee » integer-map » fxmapping-xor

fxmapping-union fxmap₁ fxmap₂ fxmap₃ procedure
fxmapping-intersection fxmap₁ fxmap₂ fxmap₃ procedure
fxmapping-difference fxmap₁ fxmap₂ fxmap₃ procedure
fxmapping-xor fxmap₁ fxmap₂procedure

Return a fxmapping whose set of associations is the union, intersection, asymmetric difference, or symmetric difference of the sets of associations of the fxmaps. Asymmetric difference is extended to more than two fxmappings by taking the difference between the first fxmapping and the union of the others. Symmetric difference is not extended beyond two fxmappings. When comparing associations, only the keys are compared. In case of duplicate keys, associations in the result fxmapping are drawn from the first fxmapping in which they appear.

Examples:

(fxmapping->alist (fxmapping-union (fxmapping 0 'a 2 'c)
                                   (fxmapping 1 'b 3 'd)))
 ⇒ ((0 . a) (1 . b) (2 . c) (3 . d))

(fxmapping->alist
 (fxmapping-intersection (fxmapping 0 'a 2 'c)
                         (fxmapping 1 'b 2 'c 3 'd)
                         (fxmapping 2 'c 4 'e)))
 ⇒ ((2 . c))

(fxmapping->alist (fxmapping-difference (fxmapping 0 'a 1 'b 2 'c)
                                        (fxmapping 2 "worf")
                                        (fxmapping 1 "data")))
 ⇒ ((0 . a))