Feedback No recursion in your definition of reduce 

Forum: U Chicago, Com Sci 221, autumn 2000
Re: News Assignment #7, due Monday 20 November (Mike O'Donnell)
Re: Question Questions about assignment #7 (Michael C. Brizic)
Date: 2000, Nov 16
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

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 reduce-tree in order to define reduce, without adding any more recursion.



Mike O'D.


to: "No recursion in your definition of reduce"