category-extras-0.53.0: Various modules and constructs inspired by category theory

Portability

portable

Stability

experimental

Maintainer

Edward Kmett <ekmett@gmail.com>

Control.Comonad.Reader

Description

If you look at the reader arrow:
(e, a) -> a you can see that all the interesting bits are bunched
on the left. This is that comonad. Flipping the pair and currying the
arguments yields a -> (e -> a), and you can recognize the (e -> a) as
the reader monad. In more technical language the Reader comonad is
left adjoint to the Reader monad.