|An implementation of the cofree comonad of a functor, used in
histomorphisms and chronomorphisms in Control.Recursion. The
cofree comonad can also be seen as a stream parameterized by a
functor that controls its branching factor.
The cofree comonad of a functor h (also known as an H-branching stream).
Various comonads are a special instance of the cofree comonad:
- Cofree Identity is an infinite stream
- Cofree Maybe is a non-empty stream
- Cofree  is a rose tree
Cofree H A = nu X. A * HX
|unCofree :: (a, h (Cofree h a))|
|anamorphism for building a cofree comonad from a seed
|Converts a value of the cofree comonad over Maybe into a non-empty list.
|Lifts a distributive law of f over h to a distributive law
of f over Cofree h.
|Produced by Haddock version 2.3.0|