forEachOrdered method

  1. @override
void forEachOrdered(
  1. void action(
    1. int
    )
)
override

Performs the given action for each element, respecting the encounter order.

Example

IntStream.range(1, 5)
    .forEachOrdered(print); // prints 1, 2, 3, 4 in order

Implementation

@override
void forEachOrdered(void Function(int) action) {
  _source.forEach(action); // In sequential context, same as forEach
}