fixplate-0.1.1: Uniplate-style generic traversals for fixed-point types, with some extras.

Data.Generics.Fixplate.Morphisms

Description

Scary named folds...

Synopsis

Documentation

para :: Functor f => (Mu f -> f a -> a) -> Mu f -> aSource

A paramorphism is a generalized (right) fold.

para' :: Functor f => (f (Mu f, a) -> a) -> Mu f -> aSource

paraList :: (Functor f, Foldable f) => (Mu f -> [a] -> a) -> Mu f -> aSource

cata :: Functor f => (f a -> a) -> Mu f -> aSource

A catamorphism is a simpler version of a paramorphism

ana :: Functor f => (a -> f a) -> a -> Mu fSource

An anamorphism is simply an unfold.

hylo :: Functor f => (f a -> a) -> (b -> f b) -> b -> aSource

A hylomorphism is the composition of a catamorphism and an anamorphism.