spanLeft ∷ (x → Either a b) → [x] → ([a], Maybe (b, [x])) Source #
The returned b
is the first in the list.
INVARIANT The output data is a segmentation of the given list.
splitAtJust ∷ (x → Maybe b) → Word64 → [x] → (Maybe ([x], b), [x]) Source #
The returned b
is either the n
th b
or else the last in the given
list.
INVARIANT The output data is a segmentation of the given list.