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

Fold.Effectful.Conversion

Description

Getting an EffectfulFold from some other type of fold

Synopsis

Documentation

fold :: Monad m => Fold a b -> EffectfulFold m a b Source #

Generalize a pure fold to an effectful fold

nonemptyFold :: Monad m => NonemptyFold a b -> EffectfulFold m a (Maybe b) Source #

Turn a nonempty fold that requires at least one input into a fold that returns Nothing when there are no inputs