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}}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.