| In the statement of problem two, you define (atom x) as (not pair? x); shouldn't it be (not (pair? x))? Also in problem two, in the definition of reduce-tree, one of the lines (in the true-branch of the cond) has (atomval treein), a function application, where it looks like to maintain symmetry with nested-reduce, and the way "atomval" suggests that it won't be treated as a fuction, it should be something like '(atomval intree) or (cons atomval intree) or something like that. Is that right? |
Corrected definition of "atom?"; left "reduce-tree" as is by Mike O'Donnell, 2001, Nov 13
to: