chickadee » srfi-113 » bag-difference

bag-union bag1 bag2 ...procedure
bag-intersection bag1 bag2 ...procedure
bag-difference bag1 bag2 ...procedure
bag-xor bag1 bag2procedure

Return a newly allocated bag that is the union, intersection, asymmetric difference, or symmetric difference of the bags. Asymmetric difference is extended to more than two bags by taking the difference between the first bag and the union of the others. Symmetric difference is not extended beyond two bags.