# 📝Contravariant Functor

tags

§ Category Theory

Contravariant functor is like a Functor, but it reverses the direction of morphisms. Contravariant functor from category $C$ to category $D$ is simply a Functor from $C^{op}$ to $D$.

Every arrow $f: A \to B$ (in $C$) is mapped to an arrow $F(f): F(B) \to F(A)$ (in $D$).

Note that Cofunctor is a misnomer for contravariant functor, as the dual of a functor is a functor.

class Contravariant f where