pub trait Bifunctor<C, D>: Higher2 {
// Required method
fn bimap(
self,
f: impl FnMut(Self::Param1) -> C,
g: impl FnMut(Self::Param2) -> D
) -> Self::Target<C, D>;
}
Expand description
Bifunctor takes two type parameters instead of one, and is a functor in both of these parameters. It defines a function bimap, which allows for mapping over both arguments at the same time