A
- A type contravariant to the input Iterable element typeB
- The output left Iterable element type, as well as the CoProduct2 A typeC
- The output right Iterable element type, as well as the CoProduct2 B typepublic final class Partition<A,B,C> extends Object implements Fn2<Fn1<? super A,? extends CoProduct2<B,C,?>>,Iterable<A>,Tuple2<Iterable<B>,Iterable<C>>>
Iterable<A>
as
and a disjoint mapping function a ->
CoProduct2<A, B>
, return a Tuple2
over the lazily unwrapped left A
and right
B
values in the first and second slots, respectively. Note that while the tuple must be constructed
eagerly, the left and right iterables contained therein are both lazy, so comprehension over infinite iterables is
supported.CoProduct2
Modifier and Type | Method and Description |
---|---|
Tuple2<Iterable<B>,Iterable<C>> |
checkedApply(Fn1<? super A,? extends CoProduct2<B,C,?>> function,
Iterable<A> as) |
static <A,B,C> Partition<A,B,C> |
partition() |
static <A,B,C> Fn1<Iterable<A>,Tuple2<Iterable<B>,Iterable<C>>> |
partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function) |
static <A,B,C> Tuple2<Iterable<B>,Iterable<C>> |
partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function,
Iterable<A> as) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, flip, fn2, fromBiFunction, toBiFunction, uncurry, widen
public Tuple2<Iterable<B>,Iterable<C>> checkedApply(Fn1<? super A,? extends CoProduct2<B,C,?>> function, Iterable<A> as)
public static <A,B,C> Partition<A,B,C> partition()
public static <A,B,C> Fn1<Iterable<A>,Tuple2<Iterable<B>,Iterable<C>>> partition(Fn1<? super A,? extends CoProduct2<B,C,?>> function)