class Eithers
package thx
Extension methods for the thx.Either
type.
Static methods
staticflatMap<L, RIn, ROut> (either:Either<L, RIn>, f:RIn ‑> Either<L, ROut>):Either<L, ROut>
Maps an Either
staticfoldMap<L, R, A> (either:Either<L, R>, f:R ‑> A, m:Monoid<A>):A
Fold by mapping the contained value into some monoidal type and reducing with that monoid.
statictoLeft<L, R> (either:Either<L, R>):Option<L>
Converts the Either
statictoLeftUnsafe<L, R> (either:Either<L, R>):Null<L>
Extracts the left value if Left, or null if Right.
statictoRight<L, R> (either:Either<L, R>):Option<R>
Converts the Either
statictoRightUnsafe<L, R> (either:Either<L, R>):Null<R>
Extracts the right value if Right, or null if Left.