folds-0.3: Beautiful Folding

Safe HaskellTrustworthy

Data.Fold.L

Synopsis

Documentation

data L a b Source

A Moore Machine

Constructors

forall r . L (r -> b) (r -> a -> r) r 

Instances

Choice L 
Profunctor L 
Folding L

efficient prefix, leaky postfix

Scan L 
AsL' L

We can convert from a lazy left folding to a strict left folding.

AsRM L

We can convert from a lazy left folding to a right or monoidal fold

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

unfoldL :: (s -> (b, a -> s)) -> s -> L a bSource

Construct a Moore machine from a state valuation and transition function