each<T> function

void each<T>(
  1. Iterable<T> list,
  2. void call(
    1. T,
    2. int
    )
)

Implementation

void each<T>(Iterable<T> list, void Function(T, int) call) {
  int i = 0;
  for (var ele in list) {
    call.call(ele, i);
    i++;
  }
}