This article contains more than enough examples to hopefully understand Covariant and Contravariant Functors and how to create them for many situtations.
Note that all type annotations use Int
as the concrete type but any concrete type would be equivalent as would any mix of concrete types.
It assumes a general understanding of Functor
and a basic understanding of Haskell type classes and data types.