Skip to content

SubsetCases

Finds non-overlapping subsets matching a pattern.

$ wo 'SubsetCases[{1, 2, 3, 4, 5}, {_, _}]'
{{1, 2}, {3, 4}}