Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- hoist :: (forall x. m x -> n x) -> EffectfulFold m a b -> EffectfulFold n a b
- duplicate :: Applicative m => EffectfulFold m a b -> EffectfulFold m a (EffectfulFold m a b)
- premap :: Monad m => (a -> m b) -> EffectfulFold m b r -> EffectfulFold m a r
- prefilter :: Monad m => (a -> m Bool) -> EffectfulFold m a r -> EffectfulFold m a r
- drop :: Monad m => Natural -> EffectfulFold m a b -> EffectfulFold m a b
Documentation
hoist :: (forall x. m x -> n x) -> EffectfulFold m a b -> EffectfulFold n a b Source #
Shift an effectful fold from one monad to another with a morphism such as
lift
or liftIO
duplicate :: Applicative m => EffectfulFold m a b -> EffectfulFold m a (EffectfulFold m a b) Source #
Allows to continue feeding an effectful fold even after passing it to a function that closes it
premap :: Monad m => (a -> m b) -> EffectfulFold m b r -> EffectfulFold m a r Source #
Apply a function to each input
prefilter :: Monad m => (a -> m Bool) -> EffectfulFold m a r -> EffectfulFold m a r Source #
Consider only inputs that match an effectful predicate
drop :: Monad m => Natural -> EffectfulFold m a b -> EffectfulFold m a b Source #
Ignore the first n inputs