mapToDouble method

  1. @override
DoubleStream mapToDouble(
  1. double mapper(
    1. int
    )
)
override

Returns a DoubleStream consisting of the results of applying the given function to the elements of this stream.

Example

final halves = IntStream.range(1, 5)
    .mapToDouble((n) => n / 2.0);

Implementation

@override
DoubleStream mapToDouble(double Function(int) mapper) {
  return StandardDoubleStream(_source.map(mapper), _parallel, _closeHandlers);
}