metamorphic-0.1.2.3: metamorphisms: ana . cata or understanding folds and unfolds

Portabilityportable
Stabilityexperimental
MaintainerDrew Day <drewday@gmail.com>
Safe HaskellSafe-Infered

Thread

Description

Code adapted from: http://web.engr.oregonstate.edu/~erwig/meta/

Documentation (and further updates in technique) forthcoming.

Documentation

type Split t i r = i -> t -> (r, t)Source

type Thread t i rSource

Arguments

 = (t, Split t i r)

i -> t -> (r,t)

type Collect r c = (r -> c -> c, c)Source

threadList' :: Collect r c -> Split t i r -> [i] -> t -> (c, t)Source

threadList :: Collect r c -> Split t i r -> [i] -> t -> (c, t)Source

type SplitM t i r = Split t i (Maybe r)Source

threadMaybe' :: (r -> a) -> Split t i r -> Split t j (Maybe i) -> Split t j (Maybe a)Source

threadMaybe :: (i -> r -> a) -> Split t i r -> SplitM t j i -> SplitM t j aSource

splitPar :: Split t i r -> Split u j s -> Split (t, u) (i, j) (r, s)Source

splitParM :: SplitM t i r -> Split u j s -> SplitM (t, u) (i, j) (r, s)Source