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

Fold.Nonempty.Utilities

Synopsis

Documentation

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

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

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

(premap f folder) returns a new fold where f is applied at each step

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

Nest a fold in an applicative