mapWhile<U extends Object> method

  1. @override
Iter<U> mapWhile<U extends Object>(
  1. Option<U> f(
    1. T
    )
)

Creates an iterator that both yields elements based on a predicate and maps. It will call this closure on each element of the iterator, and yield elements while it returns Some(_).

Implementation

@override
@pragma("vm:prefer-inline")
Iter<U> mapWhile<U extends Object>(Option<U> Function(T) f) {
  return Iter.fromIterable(_mapWhileHelper(f));
}