mapToInt abstract method

IntStream mapToInt(
  1. int mapper(
    1. T
    )
)

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

Example

final lengths = GenericStream.of(['hello', 'world'])
    .mapToInt((s) => s.length);

Implementation

IntStream mapToInt(int Function(T) mapper);