folds-0.6.2: 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

Profunctor L 
Choice L 
Folding L

efficient prefix, leaky postfix

Scan L 
AsL' L

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

AsL1' L 
AsRM L

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

AsRM1 L 
Monad (L a) 
Functor (L a) 
Applicative (L a) 
MonadZip (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