pandora-0.1.0: A box of patterns and paradigms
Pandora.Pattern.Functor.Invariant
class Invariant (t :: * -> *) where Source #
When providing a new instance, you should ensure it satisfies the two laws: Identity morphisms: invmap identity identity = identity Composition of morphisms: invmap g j . invmap f h = invmap (g . f) (h . j)
Minimal complete definition
(<$<)
Methods
(<$<) :: (a -> b) -> (b -> a) -> t a -> t b infixr 4 Source #
Infix version of invmap
invmap
invmap :: (a -> b) -> (b -> a) -> t a -> t b Source #
Prefix version of <$<
<$<
(>$>) :: (b -> a) -> (a -> b) -> t a -> t b infixl 4 Source #
Flipped version of <$<