category-extras-0.53.3: Various modules and constructs inspired by category theory

Portabilitynon-portable (functional-dependencies)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Functor.Zap

Description

Dual (bi)Functors

Synopsis

Documentation

class Zap f g | f -> g, g -> f whereSource

Minimum definition: zapWith

Methods

zapWith :: (a -> b -> c) -> f a -> g b -> cSource

zap :: f (a -> b) -> g a -> bSource

Instances

Zap Identity Identity 
Zap ((->) e) ((,) e) 
Zap (Reader e) (Coreader e) 

(>$<) :: Zap f g => f (a -> b) -> g a -> bSource

class Bizap p q | p -> q, q -> p whereSource

Minimum definition: bizapWith

Methods

bizapWith :: (a -> c -> e) -> (b -> d -> e) -> p a b -> q c d -> eSource

bizap :: p (a -> c) (b -> c) -> q a b -> cSource

Instances

Bizap Either (,) 
Bizap (,) Either 
(Bizap p q, Zap f g, Zap i j) => Bizap (Biff p f i) (Biff q g j) 

(>>$<<) :: Bizap p q => p (a -> c) (b -> c) -> q a b -> cSource