monadic-recursion-schemes-0.1.3.4: 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 anamorphism 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 catamorphism variant

histoM' Source #

Arguments

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

algebra

-> t 
-> m a 

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 on recursive variant

metaM Source #

Arguments

:: (Monad m, Traversable (Base t), Recursive s, Corecursive t, Base s ~ Base t) 
=> (Base t t -> m t)

algebra

-> (s -> m (Base s s))

coalgebra

-> s 
-> m t 

metamorphism on recursive variant

hyloM' Source #

Arguments

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

algebra

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

coalgebra

-> a 
-> m b 

hylomorphism on combination variant of ana to cata

metaM' Source #

Arguments

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

algebra

-> (a -> m (Base c a))

coalgebra

-> t 
-> m c 

metamorphism on combination variant of cata to ana

chronoM Source #

Arguments

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

algebra

-> (a -> m (Base t (Free (Base t) a)))

coalgebra

-> a 
-> m b 

chronomorphism on combination variant of futu to hist

cochronoM Source #

Arguments

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

algebra

-> (a -> m (Base c (Free (Base c) a)))

coalgebra

-> t 
-> m c 

chronoM' Source #

Arguments

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

algebra

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

coalgebra

-> a 
-> m b 

chronomorphism on recursive variant over hylomorphism