Interface Bifunctor<A, B, BF extends Bifunctor<?,?,BF>>
- Type Parameters:
A- The type of the left parameterB- The type of the right parameterBF- The unification parameter
- All Superinterfaces:
BoundedBifunctor<A,B, Object, Object, BF>
- All Known Implementing Classes:
Choice2, Choice3, Choice4, Choice5, Choice6, Choice7, Choice8, Const, Either, EitherT, RecursiveResult, These, Tuple2, Tuple3, Tuple4, Tuple5, Tuple6, Tuple7, Tuple8
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface Bifunctor<A, B, BF extends Bifunctor<?,?,BF>>
extends BoundedBifunctor<A,B,Object,Object,BF>
A dually-parametric functor that maps covariantly over both parameters.
For more information, read about Bifunctors.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionDually map covariantly over both the left and right parameters.Covariantly map over the left parameter.Covariantly map over the right parameter.
-
Method Details
-
biMapL
Covariantly map over the left parameter. -
biMapR
Covariantly map over the right parameter. For all bifunctors that are also functors, it should hold thatbiMapR(f) == fmap(f). -
biMap
Dually map covariantly over both the left and right parameters. This is isomorphic tobiMapL(lFn).biMapR(rFn).- Specified by:
biMapin interfaceBoundedBifunctor<A, B, Object, Object, BF extends Bifunctor<?,?, BF>> - Type Parameters:
C- the new left parameter typeD- the new right parameter type- Parameters:
lFn- the left parameter mapping functionrFn- the right parameter mapping function- Returns:
- a bifunctor over C (the new left parameter type) and D (the new right parameter type)
-