Split
[list]Split
[list, test]True
on consecutive elements.Split[{x, x, x, y, x, y, y, z}]
Split into increasing or decreasing runs of elements
Split[{1, 5, 6, 3, 6, 1, 6, 3, 4, 5, 4}, Less]
Split[{1, 5, 6, 3, 6, 1, 6, 3, 4, 5, 4}, Greater]
Split based on first element
Split[{x -> a, x -> y, 2 -> a, z -> c, z -> a}, First[#1] === First[#2] &]