Union[a, b, ...]A union of two lists:
Union[{a, b, c}, {c, d, e}]
A union of two associations:
Union[{a -> b}, {c -> d}]
A union of one item is the item. Note that the list is sorted:
Union[{c, b, a}]
As usual, Union removes duplicate values:
Union[{5, 1, 3, 7, 1, 8, 3}]
Union using a custom test which compares using the last coordinate of each element list:
Union[{{a, 1}, {b, 2}}, {{c, 1}, {d, 3}}, SameTest->(SameQ[Last[#1],Last[#2]]&)]
Union[{1, 2, 3}, {2, 3, 4}, SameTest->Less]