onEach method

Iterable<T> onEach(
  1. void action(
    1. T element
    )
)

Performs the given action on each element and returns the iterable itself

Implementation

Iterable<T> onEach(void Function(T element) action) {
  for (final element in this) {
    action(element);
  }
  return this;
}