union : ''a list -> ''a list -> ''a list
- union [1,2,3] [1,5,4,3]; val it = [2,1,5,4,3] : int list - union [1,1,1] [1,2,3,2]; val it = [1,2,3,2] : int list - union [1,2,3,2] [1,1,1] ; val it = [3,2,1,1,1] : int list
A high-performance implementation of finite sets may be found in structure HOLset.
ML equality types are used in the implementation of union and its kin. This limits its applicability to types that allow equality. For other types, typically abstract ones, use the ‘op_’ variants.