CS 227 lecture -*- Outline -*- * review of chapters 7, 9, and 11 ** chapter 7 Q: what were the important concepts of chapter 7? What skills? *** concepts: a procedure is a value a procedure may return a procedure, and the returned procedure remembers the environment of its creation you can extract part of an algorithm from a procedure and make it a parameter (7.4, 7.5) you can plan ahead for making specialized versions of programs by writing curried procedures (7.3) *** skills: using higher order functions like map, for-each, compose (7.2), flat-recur, deep-recur-abs currying procedures (7.3) using curried procedures (7.3) abstracting patterns from examples knowing how to check types in higher order situations ** chapter 9 Q: chapter 9? *** concepts: a vector is like a function from an index to a value (this is captured in vector-generator) a matrix is like a function from 2 indexes to a value (matrix-generator) random access (constant time access) mutation (vector-set!, matrix-set!) row-major, column-major order *** skills: creating vectors using vector-generator picking apart vectors using vector-set! to improve efficiency address calculations for row/column-major order ** chapter 11 Q: Chapter 11? *** concepts: set! changes bindings from variables to objects differences between set! and define how set! works with the scope rules and recursion what cons does what set-cdr! and set-car! do *** skills: how to use set! to write imperative programs how to control the side effects of set! and gain security by using local state * general review ** general Q: which are the most important skills? Q: design a final exam question. ** study tips do suggested practice/extra-credit problems (by hand) check by hand and then on computer read our solutions to the homework and compare with yours read over the chapters again if needed