CSC151 2009F, Class 24: Revisiting Lists Admin: * Reading for Friday: Recursion * Yet another way to do repetition * A few problems on the homework were a bit more difficult than we anticipated. * I apologize. * However, I think you're probably now a bit better with building anonymous procedures, and I think that's a good thing. * Friday's quiz will include * conditionals (Friday and Monday) * image-compute (yesterday) * The new list operations, like cons, car, and cdr (today) * Make sure you understand exercise 3 from yesterday and 5e from today. * Make sure that you're comfortable with the new list operations. * Assignment 6 is now ready, and is due Wednesday of next week. * We'll talk about it after we get through the administrivia * Looking ahead: No large assignment will be due the week after break. * Looking further ahead: GIMP (the other one) presents Rent (Nov. 13-15). * Two things you should know about GIMP+MediaScript * How to close a lot of open windows * How to insert the Six P's. Overview * About the new assignment * Lists, Revisited * New List Operations * Drawings as Values Lists * A collection of values * Homogeneous - All the same type of thinga * With for-each, map - Basically, for iteration * There's more to lists in Scheme * Heterogeneous - Different types of values * Use for other purposes, such as storing lots of information about a drawing * Need more ways to work with the elements in a list * (list-ref lst pos) - Grab an element * (car lst) - Grab the first element * (cdr lst) - Drop the first element * (cons value lst) - Create a new list by adding an element to the front * null - the empty list