[an error occurred while processing this directive]

Class 14 Notes

Lecture Slides, Suitable For Printing

Notes

Places, Frames and Envrionments
   (define nextx






Draw an environment that has multiple places named x:







Compound Application Rule
  1. Construct a new environment whose parent is the environment the procedure's environment points to
  2. Make places in that frame with the names of each parameter that contain the corresponding values of the operand expressions.
  3. Evaluate the body in the new environment
(define double 
   (lambda (x) (+ x x)))



(define nest 
  (lambda (x)
    (lambda (x)
      (+ x x))))

((nest 3) 4)
(define (evaluate-name name env)
   (if (null? env) (erro r)
       (if (frame-contains name (get-frame env))
               (lookup name (get-frame env))
           (evaluate-name name 
             (parent-environment 
                (get-frame env))))))
How do we find the value associated with a name in an environment?




Golden Ages Links

I am the student whose 3rd grade teacher wrote, "Neil should cultivate a more serious attitude towards his school work."

I am also the student whose 6th grade home-room teacher wrote, "Less social involvement and more academic diligence is in order".

I also happen to be the student who, when he first took the SATs, got 500 in the verbal section. Allow me to remind you that a score of 500 is exceptionally average. Remarkably ordinary. Undoubtedly unremarkable. Well, five books and two magazine columns later, I received a letter in the mail from the Educational Testing Service, the creators and purveyors of the SAT. The letter asked my permission to reprint a passage from one of my books for use in their verbal exam. They were impressed with my writing style and compositional form, and wanted to use the passage for the reading comprehension section of their next exam. I did not know whether to be flattered or angry, whether to kiss the letter or to burn it, or whether any single exam should have any real meaning to anyone's life at all.

Neil deGrasse Tyson's Speech at the State Department to winners of the Presidential Award for Excellence in Mathematics and Science Teaching

[an error occurred while processing this directive]