[Haskell-cafe] (Co/Contra)Functor and Comonad
cam at uptoisomorphism.net
Fri Dec 24 06:26:50 CET 2010
On Thu, Dec 23, 2010 at 11:46 PM, Mario Blažević <mblazevic at stilo.com> wrote:
> I don't personally care what's it called, as long as it's available. Can
> anybody point to an authoritative source for the terminology, though?
> Wikipedia claims that cofunctor is a contravariant functor.
Does nLab count as sufficiently authoritative? As far as I can tell it
just uses "contravariant functor" if anything, and never uses
> Also, is there anything in category theory equivalent to the Functor ->
> Applicative -> Monad hierarchy , but with a Cofunctor/Contrafunctor at the
> base? I'm just curious, I'm not advocating adding the entire hierarchy to
> the base library. ;)
As far as I understand (which may not actually be all that far),
contravariant functors just go to or from an opposite category, a
distinction that is purely a matter of definition, not anything
intrinsic. On the other hand, Applicative and Monad are based on
endofunctors specifically, i.e. functors from a category to itself,
which would seem to necessarily exclude functors from a category to
There may exist constructs specifically based on such contravariant
"endofunctors" but I doubt they'd be *equivalent* to things like
Applicative/Monad in any particular way.
More information about the Haskell-Cafe