|
In problem 2, "no explicit recursion" is allowed. Does that mean that the rewrite of reduce cannot be recursive but the call to reduce-tree can, since reduce-tree uses recursion?I think you've got it. There must be no recursion in the code that you write for reduce. All of the recursion is in reduce-tree, and you are using my version of that. I'm not sure what you mean by allowing ``the call to recuce-tree'' to be recursive. I understand ``the call'' to be the one that you write in your code for reduce. That call is not recursive, in the sense that it is not part of a cycle of calls. But there will be a cycle of calls inside the execution of reduce-tree.
To reiterate, the problem is to use the recursion that is already in the definition of Mike O'D. |
to: