MIT 6.001 Fall, 1997 Instructor: A. Meyer Recitation #7, Notes for Wed., 10/29/97 We reviewed Streams from the Tuesday lecture, explaining why (define zeroes-list (cons 0 zeroes-list)) causes an "undefined variable: ZEROES-LIST" error, but (define zeroes-stream (cons 0 zeroes-stream)) works fine: (stream-car zeroes-stream) ==> 0 (stream-car (stream-cdr zeroes-stream)) ==> 0 . . . We discussed memoization and worked on the IN-CLASS EXERCISES: 1. Complete the definition of a memoized SQRT procedure: (define memoized-sqrt ...) 2. Define a procedure MEMOIZE: Proc --> Proc where Proc = Num --> Value which "memoizes" its argument. For example, a solution to Exercise 1 would now also be: (define memoized-sqrt (memoize sqrt)) SOLUTION: See SICP, p.273.