P - The transformation type.Mu - The witness type for this profunctor.public interface Cocartesian<P extends K2,Mu extends Cocartesian _> extends Profunctor P
eithers holding that type. This allows one to add a "pass-through" value to the type transformed
via the profunctor that is left untransformed.| Modifier and Type | Method and Description |
|---|---|
<A,B,C> P<(A|C),(B|C)> |
left(P<A,B> input)
Converts the given transformation into one that transforms the left type of an
Either. |
default <A,B,C> P<(C|A),(C|B)> |
right(P<A,B> input)
Converts the given transformation into one that transforms the right type of an
Either. |
default FunctorProfunctor<CocartesianLike _> P |
toFP()
Converts this profunctor into a
FunctorProfunctor that distributes CocartesianLike functors. |
<A,B,C> P<(A|C),(B|C)> left(P<A,B> input)
Either. The right
type of the Either is left unchanged by the returned transformation.A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.Either.default <A,B,C> P<(C|A),(C|B)> right(P<A,B> input)
Either. The left
type of the Either is left unchanged by the returned transformation.left(App2) and swaps the order of the types in the
Either.A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.Either.default FunctorProfunctor<CocartesianLike _> P toFP()
FunctorProfunctor that distributes CocartesianLike functors.