In practice, often run up against the need to iterate without going into the thing we are looking for. For example, if looking for a right-recursive thing that is just the base case, after rewriting it we go into it and find the base case again, causing infinite rewriting.
Can work around this by looking for the parent, and for each parent using a second iterator with a break in the body.
In practice, often run up against the need to iterate without going into the thing we are looking for. For example, if looking for a right-recursive thing that is just the base case, after rewriting it we go into it and find the base case again, causing infinite rewriting.
Can work around this by looking for the parent, and for each parent using a second iterator with a break in the body.