I would like to split a list into non-overlapping, ascending (more precisely, non-descending with ≤) sublists. The function would be close to LongestOrderedSequence
, but instead of the longest one, we want all the ordered sequences. An example:
ls = {2, 3, 1, 2, 3, 3, 2, 1};
split[ls] == {{2, 3}, {1, 2, 3, 3}, {2}, {1}}
Sequence
:) $\endgroup$