DeleteDuplicatesBy
DeleteDuplicatesBy[{e1,e2,…},f]
deletes those ei that yield duplicates in the list {f[e1],f[e2],…}.
represents an operator form of DeleteDuplicatesBy that can be applied to an expression.
Details
- DeleteDuplicatesBy[list,f] deletes all but the first ei to produce each distinct value of f[ei].
- DeleteDuplicatesBy[<key1val1,key2val2,… >,f] deletes values of f[vali] that duplicate earlier elements, ignoring the keyi.
- DeleteDuplicatesBy never reorders elements, but only removes them.
- DeleteDuplicatesBy[f][expr] is equivalent to DeleteDuplicatesBy[expr,f].
Examples
Basic Examples (2)
Delete pairs with a duplicate last element:
Delete values from an association that have the same magnitude:
Use the operator form of DeleteDuplicatesBy:
Text
Wolfram Research (2014), DeleteDuplicatesBy, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteDuplicatesBy.html.
CMS
Wolfram Language. 2014. "DeleteDuplicatesBy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DeleteDuplicatesBy.html.
APA
Wolfram Language. (2014). DeleteDuplicatesBy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteDuplicatesBy.html