flatMap abstract method

DoubleStream flatMap(
  1. DoubleStream mapper(
    1. double
    )
)

Flattens nested DoubleStreams generated by the mapping function.

Example

final expanded = DoubleStream.of([1.0, 2.0])
    .flatMap((d) => DoubleStream.of([d, d * 2]));

Implementation

DoubleStream flatMap(DoubleStream Function(double) mapper);