consec3<A, B, C, R> function

FutureOr<R> consec3<A, B, C, R>(
  1. FutureOr<A> a,
  2. FutureOr<B> b,
  3. FutureOr<C> c,
  4. FutureOr<R> callback(
    1. A a,
    2. B b,
    3. C c
    ), {
  5. void onError(
    1. Object e
    )?,
})

Maps three synchronous or asynchronous values to a single value.

Implementation

FutureOr<R> consec3<A, B, C, R>(
  FutureOr<A> a,
  FutureOr<B> b,
  FutureOr<C> c,
  FutureOr<R> Function(A a, B b, C c) callback, {
  void Function(Object e)? onError,
}) {
  return consecList<R>(
    [a, b, c],
    (items) => callback(
      items[0] as A,
      items[1] as B,
      items[2] as C,
    ),
  );
}