What is the Comonad typeclass in Haskell? As in Comonad from Control.Comonad in the comonad package (explanations of any other packages that provide a Comonad typeclass are also welcome). I've vaguely heard about Comonad, but all I really know about it is that is provides extract :: w a -> a
, sort of a parallel to Monad's return :: a -> m a
.
Bonus points for noting "real life" uses of Comonad in "real" code.
These links may be helpful: