visit method Null safety
Implementation
void visit(void Function(int r, int c) f) {
for (int r = 0; r < rows; r++) {
for (int c = 0; c < columns; c++) {
f(r, c);
}
}
}
void visit(void Function(int r, int c) f) {
for (int r = 0; r < rows; r++) {
for (int c = 0; c < columns; c++) {
f(r, c);
}
}
}