Should I use a value receiver for visitInterior? It seems like I should use a pointer receiver to signal the intent that Matrix would be updated in place if there was a mutating function on Matrix, but I’m not sure.
type Matrix [][]int32
func (m Matrix) visitInterior(visit func(r, c int)) {
for r := 1; r < len(m) - 1; r++ {
for c := 1; c < len(m) - 1; c++ {
visit(r, c)
}
}
}