public static final class ReForgetC.Instance<R> extends Object implements AffineP ReForgetC.Mu<R>
| Modifier and Type | Class and Description |
|---|---|
static class |
ReForgetC.Instance.Mu<R> |
| Constructor and Description |
|---|
Instance() |
| Modifier and Type | Method and Description |
|---|---|
<A,B,C,D> (ReForgetC.Mu<R><A,B>) -> ReForgetC.Mu<R><C,D> |
dimap((C) -> A g,
(B) -> D h)
Takes a function from the output type
C to the input type A and a function from the input
type B to the output type D, and returns a function from a container of A, B to
a container of C, D. |
<A,B,C> ReForgetC.Mu<R><(A,C),(B,C)> |
first(ReForgetC.Mu<R><A,B> input)
Converts the given transformation into one that transforms the first type of a
Pair. |
<A,B,C> ReForgetC.Mu<R><(A|C),(B|C)> |
left(ReForgetC.Mu<R><A,B> input)
Converts the given transformation into one that transforms the left type of an
Either. |
<A,B,C> ReForgetC.Mu<R><(C|A),(C|B)> |
right(ReForgetC.Mu<R><A,B> input)
Converts the given transformation into one that transforms the right type of an
Either. |
<A,B,C> ReForgetC.Mu<R><(C,A),(C,B)> |
second(ReForgetC.Mu<R><A,B> input)
Converts the given transformation into one that transforms the second type of a
Pair. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoFPdimap, dimap, lmap, rmappublic <A,B,C,D> (ReForgetC.Mu<R><A,B>) -> ReForgetC.Mu<R><C,D> dimap((C) -> A g, (B) -> D h)
ProfunctorC to the input type A and a function from the input
type B to the output type D, and returns a function from a container of A, B to
a container of C, D.
A straightforward example of an implementation of dimap is the method Function.andThen(Function).
For functions, the expression
dimap(g, h).apply(f)
is equivalent to
g.andThen(f).andThen(h)
dimap in interface Profunctor ReForgetC.Mu<R>A - The first input type.B - The second input type.C - The first output type.D - The second output type.g - A function from output to input.h - A function from input to output.Profunctor.dimap(App2, Function, Function)public <A,B,C> ReForgetC.Mu<R><(A,C),(B,C)> first(ReForgetC.Mu<R><A,B> input)
CartesianPair. The second type
is not transformed - any values of that type are passed through the returned transformation unchanged.first in interface Cartesian ReForgetC.Mu<R>A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.public <A,B,C> ReForgetC.Mu<R><(C,A),(C,B)> second(ReForgetC.Mu<R><A,B> input)
CartesianPair. The first type
is not transformed - any values of that type are passed through the returned transformation unchanged.second in interface Cartesian ReForgetC.Mu<R>A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.public <A,B,C> ReForgetC.Mu<R><(A|C),(B|C)> left(ReForgetC.Mu<R><A,B> input)
CocartesianEither. The right
type of the Either is left unchanged by the returned transformation.left in interface Cocartesian ReForgetC.Mu<R>A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.Either.public <A,B,C> ReForgetC.Mu<R><(C|A),(C|B)> right(ReForgetC.Mu<R><A,B> input)
CocartesianEither. The left
type of the Either is left unchanged by the returned transformation.right in interface Cocartesian ReForgetC.Mu<R>A - The input type.B - The output type.C - A "pass-through" type that is not transformed.input - The transformation.Either.