Given a complicated nested lazy operation, we would like to apply a function to certain nodes in the expression tree.
Example: We found out that the whole set is nonempty, so we would like to update all inner lazy Intersections accordingly. We would write a function that checks if the current node is of type Intersection and then perform an action.
To enable this, we need a general framework that walks through the tree and applies a given function to every set.
It would be nice if we could perform tasks such as "count the maximum depth of nested intersections" with this feature.
Given a complicated nested lazy operation, we would like to apply a function to certain nodes in the expression tree. Example: We found out that the whole set is nonempty, so we would like to update all inner lazy
Intersection
s accordingly. We would write a function that checks if the current node is of typeIntersection
and then perform an action. To enable this, we need a general framework that walks through the tree and applies a given function to every set.It would be nice if we could perform tasks such as "count the maximum depth of nested intersections" with this feature.