universum-0.3: Custom prelude used in Serokell

Safe HaskellSafe
LanguageHaskell2010

Bifunctor

Documentation

class Bifunctor p where Source #

Minimal complete definition

bimap | first, second

Methods

bimap :: (a -> b) -> (c -> d) -> p a c -> p b d Source #

first :: (a -> b) -> p a c -> p b c Source #

second :: (b -> c) -> p a b -> p a c Source #

Instances

Bifunctor Either Source # 

Methods

bimap :: (a -> b) -> (c -> d) -> Either a c -> Either b d Source #

first :: (a -> b) -> Either a c -> Either b c Source #

second :: (b -> c) -> Either a b -> Either a c Source #

Bifunctor (,) Source # 

Methods

bimap :: (a -> b) -> (c -> d) -> (a, c) -> (b, d) Source #

first :: (a -> b) -> (a, c) -> (b, c) Source #

second :: (b -> c) -> (a, b) -> (a, c) Source #

Bifunctor (Const *) Source # 

Methods

bimap :: (a -> b) -> (c -> d) -> Const * a c -> Const * b d Source #

first :: (a -> b) -> Const * a c -> Const * b c Source #

second :: (b -> c) -> Const * a b -> Const * a c Source #