category-extras-0.44.1: Various modules and constructs inspired by category theory.
Control.Functor.Zip
Description
Synopsis
unfzip :: Functor f => f (a, b) -> (f a, f b)Source
unbizip :: Bifunctor p => p (a, c) (b, d) -> (p a b, p c d)Source
class Functor f => Zip f whereSource
Minimum definition:
Methods
fzip :: f a -> f b -> f (a, b)Source
fzipWith :: (a -> b -> c) -> f a -> f b -> f cSource
Instances
class Bifunctor p => Bizip p whereSource
bizip :: p a c -> p b d -> p (a, b) (c, d)Source
bizipWith :: (a -> b -> e) -> (c -> d -> f) -> p a c -> p b d -> p e fSource