SequenceSplit¶
Splits a list into segments separated by the (non-overlapping, left-to-right) subsequences that match a pattern. The separators are dropped, as are empty segments — except that when the pattern matches nothing the whole list is returned as a single segment.
The separator can be a pattern: