ZipFold-0.0: Zipping folds

Stabilityexperimental
Maintainerconal@conal.net

Data.Zip.FoldL

Description

Synopsis

Documentation

data Fold b a Source

Data representation of a left fold

Constructors

F (a -> b -> a) a 

Instances

Pair (Fold b) 
Pair' (Fold b) 

cfoldl :: Fold b a -> [b] -> aSource

Interpretation of a Fold as non-strict

cfoldl' :: Fold b a -> [b] -> aSource

Interpretation of a Fold as non-strict

data WithCont h b c Source

Add a continuation.

Instances

Functor (WithCont h b) 
Pair (h b) => Applicative (WithCont h b) 

type FoldC = WithCont FoldSource

Non-strict left fold with continuation.

cfoldlc :: FoldC b a -> [b] -> aSource

Interpretation of a FoldC

data WithCont' h b c Source

Like WithCont but with pair-strict '(*)'

Instances

Functor (WithCont' h b) 
Pair' (h b) => Applicative (WithCont' h b) 

type FoldC' = WithCont' FoldSource

Strict left fold with continuation.

cfoldlc' :: FoldC' b a -> [b] -> aSource

Interpretation of a FoldC

class Pair' f whereSource

Strict generalized pair

Methods

pair' :: f a -> f b -> f (P a b)Source

Instances

Pair' [] 
Pair' IO 
Pair' ((->) u) 
Monoid u => Pair' ((,) u) 
Pair' (Fold b) 

data P c c' Source

Strict pairs