Previous: , Up: Associative Maps   [Contents][Index]


11.8.8 Amaps as sets

procedure: amap-union! amap1 amap2

Adds the associations of amap2 to amap1 and returns amap1. If a key appears in both maps, its value is set to the value appearing in amap1.

procedure: amap-intersection! amap1 amap2

Deletes the associations from amap1 whose keys don’t also appear in amap2 and returns amap1.

procedure: amap-difference! amap1 amap2

Deletes the associations of amap1 whose keys are also present in amap2 and returns amap1.

procedure: amap-xor! amap1 amap2

Deletes the associations of amap1 whose keys are also present in amap2, and then adds the associations of amap2 whose keys are not present in amap1 to amap1. Returns amap1.