unique v -- yields the elements of the list v, without duplicates.
i1 : unique {3,2,1,3,2,4,a,3,2,3,-2,1,2,4} |
The order of elements is maintained. For something that might be slightly faster, but doesn't maintain the order of the elements, and may different answers, try making a set and then getting its elements.
i2 : toList set {3,2,1,3,2,4,a,3,2,3,-2,1,2,4} |
See also:
Class of returned value: List -- the class of all lists -- {...}Ways to use unique :