CSC151.02 2013F, Class 17: Anonymous Procedures
===============================================

_Welcome Parents!_

We've planned the following exciting activities

* Watch the professor discuss a long, drawn-out list of administrative 
  issues
* Watch your students ask questions!
* Watch your students take a quiz!
* Watch your students work on a project together

_Overview_

* Preliminaries
    * Admin.
    * Questions before the quiz. [10 minutes]
    * Quiz. 
* Learning Goals 
    * What is a procedure?
    * Describing procedures.
    * Anonymous procedures.
    * Anonymous procedures through lambda expressions.
    * Other kinds of anonymous procedures.
* Lab.

_Admin_

* Continue lab partners!  
    * I'm probably moving to switching once per week.
    * After fall break, I may let you choose partners (but may require
      that you switch once per week).
* Note for students: I will not lecture after the quiz.  Start the
  lab once you've finished the quiz.
    * So please set with your lab partner.
* I think the optional class was useful for the few folks who showed up.
  You can see some notes on the EBoard.
    * We won't have the optional class Thursday the 3rd, as I'll be
      unavailable.
    * Don't forget the mentor session Sunday night.
* Work for Monday: 
    * Work on the homework assignment
    * Read Turtle Graphics
    * Do Lab writeup 7: Exercise 5b-f from the Anonymous Procedures Lab
        * Due before class on Monday.  
        * Title: "CSC 151.02 Lab Writeup 7: Anonymous Procedures (*NAMES*)".
* A few of you have been confused about lab writeups
    * In general, due the next class.  (Exceptions when the next class is
      the next day.)
    * You can find them in every EBoard and outline.
    * I'll work on putting them in the schedule, too.
* EC Opportunities:
    * CS Extras Thursday @ 4:30: Three Students on Student Sysadmin Work
    * CS Table next Friday (Coding the Law)
    * Football, 1pm, Saturday against Beloit
    * Soccer, 1:30pm, Saturday against Beloit
    * Orchestra, 2pm, Saturday, Sebring-Lewis or somewhere similar
    * Knitting club, Saturday at 10am.  Do good and have fun!
    * Weekly discussion group on Transformative Hermaneutics of Temporal
      and Spatial Xenophobia and Xenophilia, James 1st Friday 7pm
    * More ...?
* Other things you might do (no EC, but possibly a good idea)
    * Get your Flu Shot
    * Swipe your P-Card at the Football or Soccer game
    * Poweshiek CARES March Thursday, Oct. 3.  Meet at Drake Library at 5 p.m.
    * GHS Homecoming Parade Thursday, Oct. 3.  If you've never seen a 
      small-town homecoming parade, it's worth it.  

Pre-quiz Questions
------------------

* What's it about
    * Color transformations
    * Image transformations
    * Lists
        * map, iota, make-list, list
* YOU DO NOT NEED TO KNOW APPLY
* How do you add five to every number in a list?
 
Old way

        (define add5 (lambda (x) (+ 5 x)))
        (map add5 (iota 100))

New way: Wait for lab

What does RGB complement do?
        (define rgb-complement
           (lambda (rgb)
              (rgb-new (- 255 (rgb-red rgb))
                       (- 255 (rgb-green rgb))
                       (- 255 (rgb-blue rgb)))))

What is increment?
        (define increment
           (lambda (x)
             (+ 1 x)))

* Only works with numbers
* To add one to each element of a list
        (map increment (list ....))

* What does check-drawing do?
    * Convert a drawing to an image and show the image

* What's the difference between make-list and list?
    * make-list make multiple copies of the same value.
      (make-list 10 "red") creates '("red" "red" "red" .... "red")
    * list just joins values into a list
      (list 10 "red") creates '(10 "red")
      (list "red" "red" "red") creates '("red" "red" "red")

* What's the difference between image-transform! and image-variant?
   * image-transform! changes the current imagej
   * image-variant makes a new image
   * both require a procedure that does something to each pixel

* How do we use drawing-hshift with map
  Old style
     (drawing-hshift drawing amnt)
  New style
     (map drawing-hshift (list-of-drawnigs) (list of amounts))
     (map drawing-hshift (list d1 d2 d3) (list 3 4 5))

* What does "ilk" mean?
    * Similar things, at least in the Rebelskian dialects of English
Quiz
----

* Make sure to turn off your monitor.
* Start the lab once you and your partner have finished the quiz.

Lab
---

