folds-0.2: Beautiful Folding

Safe HaskellTrustworthy

Data.Fold.M

Description

Unlike L and R this Comonad is based on a (->) r Comonad for a Monoid r rather than than on the Store r Comonad.

Synopsis

Documentation

data M a b Source

A foldMap caught in amber.

Constructors

forall m . M (m -> b) (a -> m) (m -> m -> m) m 

Instances

Choice M 
Profunctor M 
Folding M

efficient prefix, efficient postfix

AsRM M

We can convert from a monoidal fold to a lazy right fold

Monad (M a) 
Functor (M a) 
Applicative (M a) 
Comonad (M a) 
ComonadApply (M a) 
Apply (M a) 
Bind (M a) 
Extend (M a)