gambler-0.2.0.0: Composable, streaming, and efficient left folds
Safe HaskellSafe-Inferred
LanguageGHC2021

Fold.Pure.Utilities

Synopsis

Documentation

duplicate :: Fold a b -> Fold a (Fold a b) Source #

Allows to continue feeding a fold even after passing it to a function that closes it

premap :: (a -> b) -> Fold b r -> Fold a r Source #

Applies a function to each input before processing

prefilter :: (a -> Bool) -> Fold a r -> Fold a r Source #

Consider only inputs that match a predicate

predropWhile :: (a -> Bool) -> Fold a r -> Fold a r Source #

Ignores inputs until they stop satisfying a predicate

drop :: Natural -> Fold a b -> Fold a b Source #

Ignores the first n inputs

nest :: Applicative f => Fold a b -> Fold (f a) (f b) Source #

Nest a fold in an applicative