map<R> abstract method

GenericStream<R> map<R>(
  1. R mapper(
    1. T
    )
)

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

Example

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

Implementation

GenericStream<R> map<R>(R Function(T) mapper);