Copyright | (c) Ivan Lazar Miljenovic |
---|---|
License | MIT |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
- spaccum :: (a -> p) -> (p -> a -> Either p (g, Maybe a)) -> (p -> Maybe g) -> SP a g f p
- spaccum' :: Functor f => (a -> p) -> (p -> a -> Either p (g, Maybe a)) -> (p -> g) -> SP a g f ()
- spgroup :: (Eq a, Functor f) => SP a [a] f ()
- spgroupBy :: Functor f => (a -> a -> Bool) -> SP a [a] f ()
- spchunks :: Functor f => Int -> SP a [a] f ()
Documentation
:: (a -> p) | Create the initial partial accumulation |
-> (p -> a -> Either p (g, Maybe a)) | Attempt to add a new value to a partial
accumulation; returns either an updated partial
accumulation or else a completed accumulation |
-> (p -> Maybe g) | Attempt to convert the final partial accumulation
to a complete accumulation. If this function returns
|
-> SP a g f p |
Accumulate values within a Quiver.
spaccum' :: Functor f => (a -> p) -> (p -> a -> Either p (g, Maybe a)) -> (p -> g) -> SP a g f () Source #
As with spaccum
but the finalisation function always succeeds