folds-0.6: Beautiful Folding

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.

L

R

Comonad

(->) r

Monoid

r

Store r

Store

Synopsis

data M a b Source

A foldMap caught in amber. a.k.a. a monoidal reducer

foldMap

Constructors

Instances

efficient prefix, efficient postfix

prefix

postfix

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