forEachOrdered abstract method

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

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

void forEachOrdered(void Function(int) action);