Do the callback n times, argument increases
void times(int n, Function(int i) callback) { for (var i = 0; i < n; i++) { callback(i); } }