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

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

Control.Functor.Zap

Description

Dual 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 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 (BiffB p f i) (BiffB q g j) 

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