convertAsyncAs<R> method
Implementation
Future<R> convertAsyncAs<R>(
R initial,
Future<R> Function(R value, E element) combine,
) async {
Iterator<E> iterator = this.iterator;
if (!iterator.moveNext()) return initial;
R value = await combine(initial, iterator.current);
while (iterator.moveNext()) {
value = await combine(value, iterator.current);
}
return value;
}