Gather
Gather[list]
gathers the elements of list into sublists of identical elements.
Gather[list,test]
applies test to pairs of elements to determine if they should be considered identical.
Examples
open allclose allBasic Examples (2)
Applications (3)
Properties & Relations (2)
DeleteDuplicates[list] is equivalent to Gather[list][[All,1]]:
For a large list, DeleteDuplicates is much faster:
GatherBy[list,f] is equivalent to Gather[list,(f[#1]===f[#2])&]:
Gather the rows by Norm and display with the common norm of each group:
Compare to the result of Gather:
Possible Issues (1)
When the test cannot be identified as an equality comparison, Gather may be much slower:
Text
Wolfram Research (2008), Gather, Wolfram Language function, https://reference.wolfram.com/language/ref/Gather.html.
CMS
Wolfram Language. 2008. "Gather." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Gather.html.
APA
Wolfram Language. (2008). Gather. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Gather.html