def apply(self, function):
for cut in self.cuts:<EOL><INDENT>value = self.read(cut)<EOL>function(value)<EOL>self.write(cut, value)<EOL><DEDENT>
For each row or column in cuts, read a list of its colors,
apply the function to that list of colors, then write it back
to the layout.