Portability | non-portable (rank-2 polymorphism) |
---|---|

Stability | experimental |

Maintainer | Edward Kmett <ekmett@gmail.com> |

- ana :: Functor f => Coalgebra f a -> a -> FixF f
- g_ana :: (Functor f, Monad m) => Dist m f -> GCoalgebra f m a -> a -> FixF f
- distAna :: Functor f => Dist Identity f
- biana :: Bifunctor f Hask Hask Hask => Coalgebra (f b) a -> a -> Fix f b
- g_biana :: (Bifunctor f Hask Hask Hask, Monad m) => Dist m (f b) -> GCoalgebra (f b) m a -> a -> Fix f b
- hana :: HFunctor f => HCoalgebra f a -> a :~> FixH f
- kana :: HFunctor f => CointerpreterT f g h -> Lan g h :~> FixH f
- runkana :: HFunctor f => CointerpreterT f g h -> (g b -> a) -> h b -> FixH f a

# Documentation

ana :: Functor f => Coalgebra f a -> a -> FixF fSource

Anamorphisms are a generalized form of `unfoldr`

g_ana :: (Functor f, Monad m) => Dist m f -> GCoalgebra f m a -> a -> FixF fSource

Generalized anamorphisms allow you to work with a monad given a distributive law

g_biana :: (Bifunctor f Hask Hask Hask, Monad m) => Dist m (f b) -> GCoalgebra (f b) m a -> a -> Fix f bSource

hana :: HFunctor f => HCoalgebra f a -> a :~> FixH fSource

A higher-order anamorphism for constructing higher order functors.

runkana :: HFunctor f => CointerpreterT f g h -> (g b -> a) -> h b -> FixH f aSource