Either.Left<L,R>, Either.LeftProjection<L,R>, Either.Right<L,R>, Either.RightProjection<L,R>, Either.μ| Modifier and Type | Method and Description |
|---|---|
<A,B> Either<A,B> |
bimap(F1<? super L,? extends A> fn1,
F1<? super R,? extends B> fn2)
Applies the functions
fn1 and fn2 to the contents of this either,
returning a new either whose content is the result of that function application. |
<A> A |
match(F1<Either.Left<L,R>,A> left,
F1<Either.Right<L,R>,A> right)
Applies the appropriate function to this instance of
Base returning A. |
L |
value()
Returns the value in this left.
|
Eval<L> |
value$()
Returns the value in this left.
|
public L value()
public <A,B> Either<A,B> bimap(F1<? super L,? extends A> fn1, F1<? super R,? extends B> fn2)
Eitherfn1 and fn2 to the contents of this either,
returning a new either whose content is the result of that function application.public <A> A match(F1<Either.Left<L,R>,A> left, F1<Either.Right<L,R>,A> right)
Case2Base returning A.left - a function to apply if this is type A.right - a function to apply if this is type B.Copyright © 2018. All rights reserved.