UniqueElements
UniqueElements[{list1,list2,…}]
gives the elements for each listi that are not in any other list.
UniqueElements[lists,test]
uses test to determine whether pairs of elements should be considered equivalent.
Details
- UniqueElements[{list1,list2,…,listn}] returns another list of length n, with elements being sublists of the corresponding inputs lists.
- Order of elements in the original lists is preserved in output. Multiplicity is not preserved.
- The listi must have the same head, but it need not be List.
Examples
open allclose allBasic Examples (3)
Properties & Relations (3)
UniqueElements returns a list of the same length as the input:
UniqueElements[{}] is {}:
UniqueElements[{l1,l2,…}] effectively complements each list li with all other lists:
Order of elements in the original lists is preserved, but multiplicity is not:
Text
Wolfram Research (2022), UniqueElements, Wolfram Language function, https://reference.wolfram.com/language/ref/UniqueElements.html.
CMS
Wolfram Language. 2022. "UniqueElements." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/UniqueElements.html.
APA
Wolfram Language. (2022). UniqueElements. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UniqueElements.html