CSC151.02 2003F, Class 26: Local Procedure Bindings Admin * Did anyone go to the McGlotten talk? * New reading * Questions on yesterday's lab? * Behave at the 10/10 party, which is further evidence that Grinnell students cannot count. * Food Overview: * Review: What is a local variable? * Why have "local" procedures. * Technique one: letrec * Technique two: Named let * Lab Why do we want local variables and local procedures? * Local variables can clarify your code. Makes it clearer what you're talking about in a long expression if you name that expression. * Simplifies the husk-and-kernel programming strategy in that the husk really protects the kernel; no one can call the kernel directly. * Simplifies the creation of helper procedures. * Sam doesn't require as much documentation for local procedures. A summary of the purpose is still nice. * Makes it easier to name things (or at least shorter names), e.g., kernel rather than kernel-of-longest-thing-in-list-helper. A Problem! let and let* don't let you write recursive local procedures