L
- the left parameter typeR
- the right parameter typepublic final class Coalesce<L,R> extends Object implements Fn1<Iterable<Either<L,R>>,Either<Iterable<L>,Iterable<R>>>
Iterable
<Either
<L, R>>
into an Either
<Iterable
<L>, Iterable
<R>>
, preserving all results of the side that's returned. That
is, if the result is a left
, it will contain all left values; if it is a right
, it will
contain all right values.
It may be useful to think of this as a more efficient version of
.Merge
<Iterable
<L>,
Iterable
<R>>
Modifier and Type | Method and Description |
---|---|
Either<Iterable<L>,Iterable<R>> |
checkedApply(Iterable<Either<L,R>> eithers)
Invoke this function with the given argument, potentially throwing any
Throwable . |
static <A,B> Coalesce<A,B> |
coalesce() |
static <A,B> Either<Iterable<A>,Iterable<B>> |
coalesce(Iterable<Either<A,B>> eithers) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, apply, carry, cartesian, censor, choose, cocartesian, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, widen, zip, zip