to<R> method

FutureOr<Tuple<T, R>> to<R>(
  1. FutureOr<R> mapper(
    1. T input
    )
)

Implementation

FutureOr<Tuple<T, R>> to<R>(FutureOr<R> mapper(T input)) {
  final other = this.then((resolved) {
    return mapper(resolved).thenOr((second) {
      return Tuple<T, R>(resolved, second);
    });
  });
  return other.unbox();
}