zip2<A, B, T> static method
Merges the specified Singles into one Single sequence using the given
zipper
function whenever all of the Single sequences have produced
an element.
When the first data event or error event is emitted, the returned Single will emit that event and then close with a done-event. The returned Single is single-subscription Stream.
Marble
singleA: ----------a|
singleB: ---------------b|
result : ---------------ab|
singleA: ----------x|
singleB: ---------------b|
result : ----------x|
singleA: ----------x|
singleB: ---------------x|
result : ----------x|
NOTE: x is error event
Implementation
static Single<T> zip2<A, B, T>(
Single<A> singleA,
Single<B> singleB,
T Function(A, B) zipper,
) =>
Rx.zip2(singleA, singleB, zipper).takeFirstDataOrFirstErrorAndClose();