CSC151 2009F, Class 38: Trees Admin: * Reading for tomorrow: Analyzing Procedures. * One of my former advisees made the front page of NYT Arts & Leisure * Congratulations! to men's soccer. * You know that you're in too small a town when the local radio station reports on when one of your students had surgery. * (Or maybe that's just football in Iowa.) * Exam 2 returned. I hope to have an answer key ready later this week. * THERE IS MORE TO LIFE THAN GRADING! (So comments on the second half of the exam are a bit briefer than those on the first half of the exam.) * Are there questions on Lab Writeup 5? * Are there questions on Assignment 7? Overview: * Notes on exam, lab, and assignment. * Thinking about trees in terms of cons. * Thinking about trees recursively. * Writing recursive tree procedures. Questions on Writeup 5 * The pictures should be turned in in hardcopy. Please don't scan them. Notes on reverse: * Drawing on physical whiteboard. (Sorry.) * What is a list? * null is a list (the empty list) * if L is a list, (cons X L) * Looks a lot like our def'n of the natural numbers * 0 is a natural number * If N is a natural number, 1+N is a natural number * cons can take non-lists as the second parameter * A color tree is a pair structure defined as follows * A color is a color tree * If C1 and C2 are color trees, than so is (cons C1 C2)