Typeclass for (what seems to be) a contravariant functor implementing function inversion
问题 Lets say I have the following import Control.Category (Category, (.), id) data Invertible a b = Invertible (a -> b) (b -> a) instance Category Invertible where id = Invertible Prelude.id Prelude.id (Invertible f f') . (Invertible g g') = Invertible (f Prelude.. g) (g' Prelude.. f') invert (Invertible x y) = Invertible y x Note that the following is true: invert (g . f) == invert f . invert g This structure seems very similar to a contravariant functor (wikipedia), as it follows the same axiom