Data.Bifunctor.Linear.Internal.Bifunctor
class Bifunctor p where Source #
The Bifunctor class
If bimap is supplied, then bimap id id = id
bimap
bimap id id = id
id
first
second
first id ≡ id second id ≡ id
.
Minimal complete definition
bimap | first, second
Methods
bimap :: (a %1 -> b) -> (c %1 -> d) -> (a `p` c) %1 -> b `p` d Source #
first :: (a %1 -> b) -> (a `p` c) %1 -> b `p` c Source #
second :: (b %1 -> c) -> (a `p` b) %1 -> a `p` c Source #
Defined in Data.Bifunctor.Linear.Internal.Bifunctor
bimap :: (a %1 -> b) -> (c %1 -> d) -> Either a c %1 -> Either b d Source #
first :: (a %1 -> b) -> Either a c %1 -> Either b c Source #
second :: (b %1 -> c) -> Either a b %1 -> Either a c Source #
bimap :: (a %1 -> b) -> (c %1 -> d) -> (a, c) %1 -> (b, d) Source #
first :: (a %1 -> b) -> (a, c) %1 -> (b, c) Source #
second :: (b %1 -> c) -> (a, b) %1 -> (a, c) Source #