SequenceCases¶
Find matching subsequences in a list.
$ wo 'SequenceCases[x, y]'
SequenceCases::list: List expected at position 1 in SequenceCases[x, y].
SequenceCases[x, y]
The Overlaps option controls how much of the list a match may share with its
neighbours. The default keeps matches disjoint, Overlaps -> True reports the
longest match at every start position, and Overlaps -> All reports every
match at every start position:
The name : pattern :> body binding form lets the right-hand side reference
the matched sub-list: