forEach abstract method

void forEach(
  1. void action(
    1. T
    )
)

Performs an action for each element of this stream.

Example

GenericStream.of([1, 2, 3, 4, 5])
    .forEach(print); // prints 1, 2, 3, 4, 5

Implementation

void forEach(void Function(T) action);