Skip to content

Complement

Complement[expr1, expr2, ...] returns a sorted union of the items in the expressions.

Attributes[Complement] := {Protected}

Simple examples

In[1]:= Intersection[{a, b}, {a}]
Out[1]= {a}
In[2]:= Intersection[{a, b, c}, {a}, {b}]
Out[2]= {}