category-extras-0.44.1: Various modules and constructs inspired by category theory.Source codeContentsIndex
Control.Morphism.Ana
Portabilitynon-portable (rank-2 polymorphism)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Description
Synopsis
ana :: Functor f => CoAlg f a -> a -> Fix f
g_ana :: (Functor f, Monad m) => Dist m f -> CoAlgM f m a -> a -> Fix f
distAna :: Functor f => Dist Identity f
biana :: Bifunctor f => CoAlg (f b) a -> a -> FixB f b
g_biana :: (Bifunctor f, Monad m) => Dist m (f b) -> CoAlgM (f b) m a -> a -> FixB f b
hana :: HFunctor f => CoAlgH f a -> Natural a (FixH f)
Documentation
ana :: Functor f => CoAlg f a -> a -> Fix fSource
Anamorphisms are a generalized form of unfoldr
g_ana :: (Functor f, Monad m) => Dist m f -> CoAlgM f m a -> a -> Fix fSource
Generalized anamorphisms allow you to work with a monad given a distributive law
distAna :: Functor f => Dist Identity fSource
The distributive law for the identity monad
biana :: Bifunctor f => CoAlg (f b) a -> a -> FixB f bSource
g_biana :: (Bifunctor f, Monad m) => Dist m (f b) -> CoAlgM (f b) m a -> a -> FixB f bSource
hana :: HFunctor f => CoAlgH f a -> Natural a (FixH f)Source
A higher-order anamorphism for constructing higher order functors.
Produced by Haddock version 2.1.0