repeat function

void repeat(
  1. int times,
  2. void predicate(
    1. int
    )
)

Implementation

void repeat(int times, void Function(int) predicate) {
  for (var i = 0; i < times; ++i) {
    predicate(i);
  }
}