splitwhen -package:mono-traversable

Split on elements satisfying the given predicate. Equivalent to split . dropDelims . whenElt.
>>> splitWhen (<0) [1,3,-4,5,7,-9,0,2]
[[1,3],[5,7],[0,2]]
>>> splitWhen (<0) [1,-2,3,4,-5,-6,7,8,-9]
[[1],[3,4],[],[7,8],[]]
Split on elements satisfying the given predicate. Equivalent to split . dropDelims . whenElt. For example:
>>> splitWhen (<0) (BV.fromList [1,3,-4,5,7,-9,0,2])
[[1,3],[5,7],[0,2]]
Monadic variant of break. Consumes items from the list until a condition holds.