forEach method

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

Performs the given action on each element.

Implementation

void forEach(void Function(T element) action) {
  final i = iterator();
  while (i.hasNext()) {
    final element = i.next();
    action(element);
  }
}