5

Shortest[] doesn't appear to work with Sequence s. Is this a bug or a feature? What can I do to force the following SequenceCases to work?

In[1]:= SequenceCases[{1,1,2,2,0,0,2,2,2,1},{2,2,Shortest[___],2,2}]
Out[1]= {{2,2,0,0,2,2,2}}

Expected output:

Out[1]= {{2,2,0,0,2,2}}
podge cassidy
  • 483
  • 2
  • 6

0 Answers0