def preorder(self, f):
        for x in f(self):
            yield x
        for c in self.children():
            for x in c.postorder(f):
                yield x
Preorder traversal, applying a function to each operator.  The
dataset/ETHPy150Open uwescience/raco/raco/algebra.py/Operator.preorder