forkJoin2<A, B, T> static method

Stream<T> forkJoin2<A, B, T>(
  1. Stream<A> streamA,
  2. Stream<B> streamB,
  3. T combiner(
    1. A a,
    2. B b
    )
)

Merges the given Streams into a single Stream sequence by using the combiner function when all of the stream sequences emits their last item.

Example

Rx.forkJoin2(
  Stream.value(1),
  Stream.fromIterable([0, 1, 2]),
  (a, b) => a + b)
.listen(print); //prints 3

Implementation

static Stream<T> forkJoin2<A, B, T>(Stream<A> streamA, Stream<B> streamB,
        T Function(A a, B b) combiner) =>
    ForkJoinStream.join2(streamA, streamB, combiner);