A simple stateful function composing monad that chains state passing functions. This can be considered as a simplified version of the State monad or even a Fold. Unlike fold the step function is one-shot and not called in a loop.
Constructors
Builder (s -> m (a, s))
Instances3Monad, Functor, Applicative
Monad m => Monad (Builder a m)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.BuilderFunctor m => Functor (Builder s m)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.BuilderMaps a function on the output of the fold (the type
b).Monad m => Applicative (Builder a m)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Builder