zip3<R, A, B, C> function

EventSubscriptionBuilder<R> zip3<R, A, B, C>(
  1. EventSubscriptionBuilder<A> eventA,
  2. EventSubscriptionBuilder<B> eventB,
  3. EventSubscriptionBuilder<C> eventC,
  4. R zipper(
    1. A a,
    2. B b,
    3. C c
    ),
)

Zips the values of each provided event using the zipper into a single output EventHandler when all handlers have emitted at each index.

See zip.

Implementation

EventSubscriptionBuilder<R> zip3<R, A, B, C>(
  EventSubscriptionBuilder<A> eventA,
  EventSubscriptionBuilder<B> eventB,
  EventSubscriptionBuilder<C> eventC,
  R Function(A a, B b, C c) zipper,
) {
  return zip(
    [eventA, eventB, eventC],
    (values) {
      final a = values[0] as A;
      final b = values[1] as B;
      final c = values[2] as C;

      return zipper(a, b, c);
    },
  );
}