map abstract method

DoubleStream map(
  1. double mapper(
    1. double
    )
)

Transforms each element using the provided mapping function.

Example

final squares = DoubleStream.of([1.5, 2.5, 3.5])
    .map((d) => d * d);

Implementation

DoubleStream map(double Function(double) mapper);