T, R> method
- R zipper(
Merges the iterable streams into one observable sequence using the given zipper function whenever all of the observable sequences have produced an element at a corresponding index.
It applies this function in strict sequence, so the first item emitted by the new Observable will be the result of the function applied to the first item emitted by Observable #1 and the first item emitted by Observable #2; the second item emitted by the new zip-Observable will be the result of the function applied to the second item emitted by Observable #1 and the second item emitted by Observable #2; and so forth. It will only emit as many items as the number of items emitted by the source Observable that emits the fewest items.
Observable.zip( [ Observable.just("Hi "), Observable.fromIterable(["Friend", "Dropped"]), ], (values) => values.first + values.last ) .listen(print); // prints "Hi Friend"
static Observable<R> zip<T, R>( Iterable<Stream<T>> streams, R zipper(List<T> values)) => Observable<R>(ZipStream(streams, zipper));