Dear All, Class notes from today are broken up into several files: http://www.cs.dartmouth.edu/~sergey/cs59/midterm-notes.txt On Lisp dynamic scoping: http://www.cs.dartmouth.edu/~sergey/cs59/lisp/scope-example.txt http://www.cs.dartmouth.edu/~sergey/cs59/lisp/how-emacs-captures-closures.txt (older notes, delving into how Emacs24 makes closures under lexical scoping by putting closed-over variables into constant vectors and attaching them to bytecode when the lambda is _called_; thus, the body of a compiled closure starts with a call to make-byte-code that makes the attachment. This call is obviously compiled to bytecode, too, which makes it a bit hard to read---a good project would be to write a better disassembler that makes it clearer). Last but not least, Ruby on Ruby blocks actually being closures: Finish Chapters 3 and 4 till method lookup; read chapter 8. We have not covered method lookup in the second half of Ch.4 in class yet, but you read ahead that second half and Ch. 5. Code example from class is in http://www.cs.dartmouth.edu/~sergey/cs59/ruby/walking-envs.rb Tweak it as you read Ch. 4 and Ch. 8. Thank you, --Sergey