Skip to main content

SequenceSplit

SequenceSplit[list,patt] splits list into sublists separated by sequences that match the sequence pattern patt. 

SequenceSplit[list,patt->rhs] inserts rhs at the position of each matched sequence.

SequenceSplit[list,{patt1->rhs1,…}] inserts rhsi at the position of each patti.

SequenceSplit[list,patt,n] splits into at most n sublists.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.