DocumentationMathematicaBuilt-in FunctionsLists and MatricesStructure Manipulation
Split[list] splits list into sublists consisting of runs of identical elements.
Split[list, test] treats pairs of adjacent elements as identical whenever applying the function test to them yields True.
Example: Split[a, a, b, b, a, a, b] .
The default function used to test whether elements are identical is SameQ.
Split can be used to perform run-length encoding.
See Section 1.8.10 and Section 2.4.4.
See also: Partition, Union, Flatten, ReplaceList.
New in Version 3.