MIT 6.001 Fall, 1997 Instructor: A. Meyer Recitation #7, Notes for Fri., 11/14/97 T.A. Anna Chefter ran this recitation, covering the basic eval-apply cycle of the meta-circular evaluator of Section 4.1. The IN-CLASS EXERCISE was to complete the definition of (define (eval-sequence exps env) ...) and many students were indeed able to derive the code used in Section 4.1 (without looking it up). A couple of students used MAP: (define (eval-sequence exps env) (let ((vals (map (lambda (exp) (meval exp env)) exps))) (list-ref vals (dec (length vals))))) ;the last value This is right PROVIDING the underlying Scheme evaluates the operands of a combination from left to right, because MAP applies its procedure argument to the elements of its list argument in the evaluation order of the underlying Scheme. So this definition with MAP will be INCORRECT in MIT Scheme, for example, which goes right to left. The definition of EVAL-SEQUENCE in Section 4.1 will correctly evaluate the EXPS from left to right no matter what evaluation order the underlying Scheme uses. This observation provides nice motivation for next week's 5 min presentation.