A Cofunctor is a structure from category theory dual to Functor https://github.com/jaspervdj/acme-cofunctor
|Latest on Hackage:||0.1.0.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Cofunctor is a structure from category theory dual to
Functor is defined by the operation
fmap :: (a -> b) -> (f a -> f b)
This means that its dual must be defined by the following operation:
cofmap :: (b -> a) -> (f b -> f a)
Since beginning his investigations, the author of this package has discovered
that this pattern is at least as commonly used as
Functor. In fact, many
ubiquitous Haskell types (e.g.
((->) a) turn out to have a