map abstract method

IntStream map(
  1. int mapper(
    1. int
    )
)

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

Example

final squares = IntStream.range(1, 5)
    .map((n) => n * n);

Implementation

IntStream map(int Function(int) mapper);