A
- the type of the left parameterB
- the type of the left parameterP
- the unification parameterpublic interface Cartesian<A,B,P extends Cartesian<?,?,P>> extends Profunctor<A,B,P>
Fn1
,
Cocartesian
Modifier and Type | Method and Description |
---|---|
default Cartesian<A,Tuple2<A,B>,P> |
carry()
Pair the covariantly-positioned carrier type with the contravariantly-positioned carrier type.
|
<C> Cartesian<Tuple2<C,A>,Tuple2<C,B>,P> |
cartesian()
Pair some type
C to this profunctor's carrier types. |
default <Z> Cartesian<Z,B,P> |
contraMap(Fn1<? super Z,? extends A> fn)
Contravariantly map
A <- B . |
<Z,C> Cartesian<Z,C,P> |
diMap(Fn1<? super Z,? extends A> lFn,
Fn1<? super B,? extends C> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.
|
default <Z> Cartesian<Z,B,P> |
diMapL(Fn1<? super Z,? extends A> fn)
Contravariantly map over the left parameter.
|
default <C> Cartesian<A,C,P> |
diMapR(Fn1<? super B,? extends C> fn)
Covariantly map over the right parameter.
|
<C> Cartesian<Tuple2<C,A>,Tuple2<C,B>,P> cartesian()
C
to this profunctor's carrier types.C
- the paired typedefault Cartesian<A,Tuple2<A,B>,P> carry()
<Z,C> Cartesian<Z,C,P> diMap(Fn1<? super Z,? extends A> lFn, Fn1<? super B,? extends C> rFn)
diMapL(lFn).diMapR(rFn)
.diMap
in interface Profunctor<A,B,P extends Cartesian<?,?,P>>
Z
- the new left parameter typeC
- the new right parameter typelFn
- the left parameter mapping functionrFn
- the right parameter mapping functiondefault <Z> Cartesian<Z,B,P> diMapL(Fn1<? super Z,? extends A> fn)
default <C> Cartesian<A,C,P> diMapR(Fn1<? super B,? extends C> fn)
diMapR(f) == fmap(f)
.default <Z> Cartesian<Z,B,P> contraMap(Fn1<? super Z,? extends A> fn)
A <- B
.contraMap
in interface Contravariant<A,Profunctor<?,B,P extends Cartesian<?,?,P>>>
contraMap
in interface Profunctor<A,B,P extends Cartesian<?,?,P>>
Z
- the new parameter typefn
- the mapping function