FR
PréludeChargé par défaut — aucun import nécessaire.

Bifunctor

Synopsis
interface Bifunctor f where
bimap : (a -> c) -> (b -> d) -> f a b -> f c d
first : (a -> c) -> f a b -> f c b
second : (b -> d) -> f a b -> f a d

A Bifunctor is a type constructor of TWO arguments that you can map over in BOTH positions at once. bimap g h applies g to the left component and h to the right. first/second map just one side (defaults in terms of bimap).

Instances : Either, Pair, Result