monadic-recursion-schemes-0.1.3.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 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' :: (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 on recursive variant

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

metamorphism on recursive variant

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

chronomorphism on combination variant of futu to hist chronoM' :: (Monad m, Traversable (Base t), Recursive t, Corecursive t) => (Base t (Cofree (Base t) c) -> m c) -- ^ algebra -> (a -> m (Base t (Free (Base t) a))) -- ^ coalgebra -> a -> m c

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

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