Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Data.Sequence.Util
Description
Synopsis
- splitMonotone :: (a -> Bool) -> Seq a -> (Seq a, Seq a)
Documentation
splitMonotone :: (a -> Bool) -> Seq a -> (Seq a, Seq a) Source #
Partition the seq s given a monotone predicate p into (xs,ys) such that
all elements in xs do *not* satisfy the predicate p all elements in ys do satisfy the predicate p
all elements in s occur in either xs or ys.
running time: O(log2n+T∗logn), where T is the time to execute the predicate.