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