this looks like a handy method, but we should add a mechanism to allow the operation to terminate recursion early, otherwise the routine can only be used by operations that must touch the entire tree.