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

# 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