A Cofunctor is a structure from category theory dual to Functor .

A Functor is defined by the operation fmap :

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)