forEach method

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

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

@override
void forEach(void Function(T) action) {
  _source.forEach(action);
}