process method

void process(
  1. dynamic action(
    1. T item
    )
)

Processes each element of the iterable using the provided action function.

Parameters

  • action: The function to apply to each element of the iterable

Example

final numbers = <int>[1, 2, 3, 5, 6, 7];
numbers.process((e) => print(e));

Implementation

void process(Function(T item) action) {
  for (final element in this) {
    action(element);
  }
}