Possible Duplicate:
How can I remove B -> A from a list if A -> B is in the list?
Delete duplicate elements from list
Pattern matching deletion of list items
How do I delete the duplicates of a set who's elements are themselves sets?
Here is an example: Deleting the duplicates from {{x,y},{y,x}} should give {{x,y}} (or {{y,x}}, both answers are equivalent).
I am particularly interested in the case when x and y are lists, but a solution that works for x and y of any type would be better.
{{2, 1}, {1, 2}, {3, 1}}. Should it be{{1, 2}, {1, 3}}or{1, 2, 3}? – István Zachar Jun 29 '12 at 19:44{2, 1}equals{1, 2}, which means that a simpleDeleteDuplicatesis not enough. If anything, then Thies' answer could be the source, and those voting for closing should point to that post. – István Zachar Jun 29 '12 at 21:38