flatMap<R> method

Iterable<R> flatMap<R>(
  1. Iterable<R> transform(
    1. E element
    )
)

Returns a new lazy Iterable of all elements yielded from results of transform function being invoked on each element of this collection.

Implementation

Iterable<R> flatMap<R>(Iterable<R> Function(E element) transform) sync* {
  for (var current in this) {
    yield* transform(current);
  }
}