List/array/set utility functions: union, intersect, complement, unique, first, last, has, add, toggle