Module

Matryoshka.Fold

Package
purescript-matryoshka
Repository
purescript-contrib/purescript-matryoshka

#cata Source

cata :: forall t f a. Recursive t f => Algebra f a -> t -> a

#cataM Source

cataM :: forall t f m a. Recursive t f => Monad m => Traversable f => AlgebraM m f a -> t -> m a

#gcata Source

gcata :: forall t f w a. Recursive t f => Comonad w => DistributiveLaw f w -> GAlgebra w f a -> t -> a

#gcataM Source

gcataM :: forall t f w m a. Recursive t f => Monad m => Comonad w => Traversable f => Traversable w => DistributiveLaw f w -> GAlgebraM w m f a -> t -> m a

#elgotCata Source

elgotCata :: forall t f w a. Recursive t f => Comonad w => DistributiveLaw f w -> ElgotAlgebra w f a -> t -> a

#transCata Source

transCata :: forall t f u g. Recursive t f => Corecursive u g => Transform u f g -> t -> u

#transCataT Source

transCataT :: forall t f. Recursive t f => Corecursive t f => (t -> t) -> t -> t

#transCataM Source

transCataM :: forall t f u g m. Recursive t f => Corecursive u g => Monad m => Traversable f => TransformM m u f g -> t -> m u

#transCataTM Source

transCataTM :: forall t f m. Recursive t f => Corecursive t f => Monad m => Traversable f => (t -> m t) -> t -> m t

#topDownCata Source

topDownCata :: forall t f a. Recursive t f => Corecursive t f => (a -> t -> Tuple a t) -> a -> t -> t

#topDownCataM Source

topDownCataM :: forall t f m a. Recursive t f => Corecursive t f => Monad m => Traversable f => (a -> t -> m (Tuple a t)) -> a -> t -> m t

#prepro Source

prepro :: forall t f a. Recursive t f => Corecursive t f => (f ~> f) -> Algebra f a -> t -> a

#gprepro Source

gprepro :: forall t f w a. Recursive t f => Corecursive t f => Comonad w => DistributiveLaw f w -> (f ~> f) -> GAlgebra w f a -> t -> a

#transPrepro Source

transPrepro :: forall t f u g. Recursive t f => Corecursive t f => Corecursive u g => (f ~> f) -> Transform u f g -> t -> u

#para Source

para :: forall t f a. Recursive t f => GAlgebra (Tuple t) f a -> t -> a

#paraM Source

paraM :: forall t f m a. Recursive t f => Monad m => Traversable f => GAlgebraM (Tuple t) m f a -> t -> m a

#gpara Source

gpara :: forall t f w a. Recursive t f => Corecursive t f => Comonad w => DistributiveLaw f w -> GAlgebra (EnvT t w) f a -> t -> a

#elgotPara Source

elgotPara :: forall t f a. Recursive t f => ElgotAlgebra (Tuple t) f a -> t -> a

#transPara Source

transPara :: forall t f u g. Recursive t f => Corecursive u g => AlgebraicGTransform (Tuple t) u f g -> t -> u

#transParaT Source

transParaT :: forall t f. Recursive t f => Corecursive t f => (t -> t -> t) -> t -> t

#zygo Source

zygo :: forall t f a b. Recursive t f => Algebra f b -> GAlgebra (Tuple b) f a -> t -> a

#gzygo Source

gzygo :: forall t f w a b. Recursive t f => Comonad w => Algebra f b -> DistributiveLaw f w -> GAlgebra (EnvT b w) f a -> t -> a

#elgotZygo Source

elgotZygo :: forall t f a b. Recursive t f => Algebra f b -> ElgotAlgebra (Tuple b) f a -> t -> a

#gElgotZygo Source

gElgotZygo :: forall t f w a b. Recursive t f => Comonad w => Algebra f b -> DistributiveLaw f w -> ElgotAlgebra (EnvT b w) f a -> t -> a

#mutu Source

mutu :: forall t f a b. Recursive t f => GAlgebra (Tuple a) f b -> GAlgebra (Tuple b) f a -> t -> a

#histo Source

histo :: forall t f a. Recursive t f => GAlgebra (Cofree f) f a -> t -> a

#ghisto Source

ghisto :: forall t f h a. Recursive t f => Functor h => DistributiveLaw f h -> GAlgebra (Cofree h) f a -> t -> a

#elgotHisto Source

elgotHisto :: forall t f a. Recursive t f => ElgotAlgebra (Cofree f) f a -> t -> a

#annotateTopDown Source

annotateTopDown :: forall t f a. Recursive t f => (a -> f t -> a) -> a -> t -> Cofree f a

#annotateTopDownM Source

annotateTopDownM :: forall t f m a. Recursive t f => Monad m => Traversable f => (a -> f t -> m a) -> a -> t -> m (Cofree f a)

#isLeaf Source

isLeaf :: forall t f. Recursive t f => Foldable f => t -> Boolean

#children Source

children :: forall t f. Recursive t f => Foldable f => t -> List t

#universe Source

universe :: forall t f. Recursive t f => Foldable f => t -> List t

#lambek Source

lambek :: forall t f. Recursive t f => Corecursive t f => t -> f t