flatMap method
Returns a stream consisting of the results of replacing each element with the contents of a mapped stream.
Example
final expanded = IntStream.range(1, 3)
.flatMap((n) => IntStream.range(0, n));
Implementation
@override
IntStream flatMap(IntStream Function(int) mapper) {
return StandardIntStream(
_source.expand((element) => mapper(element).iterable()),
_parallel,
_closeHandlers,
);
}