ZipFold-0.1.4: Zipping folds

Stabilityexperimental
Maintainerconal@conal.net

Data.Zip.FoldR

Description

Zipping of non-strict right folds.

See http://conal.net/blog/tag/zip. Inspired by Beautiful Folds by Max Rabkin http://squing.blogspot.com/2008/11/beautiful-folding.html

Synopsis

Documentation

data FoldR b a Source

Data representation of a right fold

Constructors

F (b -> a -> a) a 

Instances

Zip (FoldR b) 

cfoldr :: FoldR b a -> [b] -> aSource

Interpretation of a FoldR as non-strict

data WithCont z c Source

Add a continuation.

Instances

Functor (WithCont z) 
Zip z => Applicative (WithCont z) 
Zip z => Zip (WithCont z) 
Zip z => Monoidal (WithCont z) 

type FoldRC b = WithCont (FoldR b)Source

Non-strict right fold with continuation.

cfoldrc :: FoldRC b a -> [b] -> aSource

Interpretation of a FoldRC