monadic-recursion-schemes-0.1.1.0: Recursion Schemes for Monadic version.

Safe HaskellSafe
LanguageHaskell2010

Data.Functor.Foldable.Monadic

Synopsis

Documentation

cataM Source #

Arguments

:: (Monad m, Traversable (Base t), Recursive t) 
=> (Base t a -> m a)

algebra

-> t 
-> m a 

catamorphism

anaM Source #

Arguments

:: (Monad m, Traversable (Base t), Corecursive t) 
=> (a -> m (Base t a))

coalgebra

-> a 
-> m t 

anamorphism

paraM Source #

Arguments

:: (Monad m, Traversable (Base t), Recursive t) 
=> (Base t (t, a) -> m a)

algebra

-> t 
-> m a 

paramorphism

apoM Source #

Arguments

:: (Monad m, Traversable (Base t), Corecursive t) 
=> (a -> m (Base t (Either t a)))

coalgebra

-> a 
-> m t 

apomorphism

histoM Source #

Arguments

:: (Monad m, Traversable (Base t), Recursive t) 
=> (Base t (Cofree (Base t) a) -> m a)

algebra

-> t 
-> m a 

histomorphism on recursion variant

futuM Source #

Arguments

:: (Monad m, Traversable (Base t), Corecursive t) 
=> (a -> m (Base t (Free (Base t) a)))

coalgebra

-> a 
-> m t 

futumorphism on recursion variant

histoM' :: (Monad m, Traversable (Base t), Recursive t) => (Base t (Cofree (Base t) a) -> m a) -> t -> m a Source #

histomorphism on catamorphism variant

futuM' Source #

Arguments

:: (Monad m, Traversable (Base t), Corecursive t) 
=> (a -> m (Base t (Free (Base t) a)))

coalgebra

-> a 
-> m t 

futumorphism on anamorphism variant

zygoM Source #

Arguments

:: (Monad m, Traversable (Base t), Recursive t) 
=> (Base t a -> m a)

algebra for fst

-> (Base t (a, b) -> m b)

algebra for snd from product

-> t 
-> m b 

zygomorphism

cozygoM Source #

Arguments

:: (Monad m, Traversable (Base t), Corecursive t) 
=> (a -> m (Base t a))

coalgebra for fst

-> (b -> m (Base t (Either a b)))

coalgebra for snd to coproduct

-> b 
-> m t 

cozygomorphism

hyloM Source #

Arguments

:: (Monad m, Traversable t) 
=> (t b -> m b)

algebra

-> (a -> m (t a))

coalgebra

-> a 
-> m b 

hylomorphism