I've learned that a recursive depth-first search procedure searches a whole tree by its depth, tracing through all possible choices.
However, I want to modify the function such that I can call a "total exit" in the middle, which will completely stop the recursion. Is there an efficient way to do this?
