CSC151 2007S, Class 15: Representing Images as Lists of Spots Admin: * Sorry for the problems with DrFu over the weekend. We're hoping not too many more crop up. * Free extension on exam until class time on Monday Oct 1 * The charge for an extension beyond that time is 100 points on the test, even if you work eight or more hours on the test * Warning! For those of you who did the reading early: I've changed terminology slightly. * New groups! Sam used a naive technique for making these pairs. * Reading for Tuesday: Iterating Over Lists. * Are there questions on Exam 1? * SENTIENT AND MALICIOUS Overview: * Spot lists: Another perspective on images. * Lists in Scheme. * Basic list operations. * Processing spot lists. /Ways to Represent Collections in Scheme/ * The most common technique: The list * Core part of Lisp, the language that Scheme was based on * In the abstract, a list is an ordered collection of data * In the concrete, we need procedrues to work with lists * nil, the name of the empty list * (cons value lst) - Add value to the front * Backwards: We traditionally add to the end. * (car lst) - first element * (cdr lst) - all but first element * (list val1 val2 ... valn) - create a list of val1 ... valn * In that order! /Debrief/ * Sam's typoes are really tests to see if you're paying attention. *