Itertating a 2D matrix

Even in Python, this should have been using reduce().