CSC151.02 2016S, Class 43: Higher-Order Procedures, Revisited
=============================================================

_Overview_

* Preliminaries.
    * Admin.
    * Upcoming Work.
    * Extra Credit.
    * Questions.
* Lab.

Preliminaries
-------------

### Admin

* New partners!
* I will continue to bring you food (or food-like substances) until I am 
  caught up on grading.  (You may be getting food until you graduate from
  Grinnell.)
* Sorry about yesterday.  My wife tells me that it's about the fifth time
  she can recall that I've skipped class because I was sick.  (And we've
  been married over 28 years.)
* Note that there's a [grading rubric](../assignments/project-rubric.txt) 
  for the project.  Pay attention to it as you work on your proposal and
  project.
* Yesterday went so well that I'm not going to talk any more.

### Reminders

* Office hours this week 
    * See http://rebelsky.youcanbook.me.
    * Ask me about other available times.
* Tutor hours
    * Sunday, 3-5 p.m.
    * Sunday-Thursday, 7-10 p.m.
* Review Sessions
    * Wednesday at 8pm in CS commons with Zachary
    * Thursday at 10 am with SamR 
    * Thursday at 8pm in CS commons with Alex

### Upcoming Work:

* Reading for Friday
    * [Files](../readings/files-reading.html)
* Lab Writeup: Exercise 5
    * Send email titled __CSC 151 Lab Writeup 43 (Your Names)__
    * Do not include the underscores.
    * Send to <CSC151-02-grader@grinnell.edu>
    * Due before class on Monday.
* Quiz Friday!
    * Trees
    * Maybe more on turtles
* Project proposals Monday.

### Extra Credit

* Send your reports to <rebelsky@grinnell.edu> with subject 
  "CSC 151 Extra Credit".  (Do not include the quotation marks.)
* Send opportunities to me before class with subject
  "CSC 151 EXTRA CREDIT OPPORTUNITY!"

#### Academic / Artistic

* Any of the fora on the report from the Residential Learning Task Force.
    * Wednesday, April 20, 7:00-8:30 p.m., Noyce 2022
    * Friday, April 22, 1:00-2:30 p.m., JRC 209
    * Tuesday, April 26, 11:00 a.m. - 12:00 noon, JRC 101
    * Tuesday, 6:00-7:00 pm, JRC 209
* Math/Stats Student Seminar, Elizabeth Eason and Jun Take Lee: Cascades and Multifractals - noon, Thursday, April 21
* Presentation, Statistical Modeling in Genome-Wide Association Studies: Identifying Disease-associated Genes Using Gene Pathways", Thursday, April 21, 4:15 p.m., ARH 102
* Classics Seminar, April 21, Jeffrey Hurwitt, JRC 101, 4:15 pm
* Scholars' Convocation: Dutch Global Horizons, Thursday, April 28, 11 am, JRC 101
* Damon Williams: Bigger Than The Cops, April 28, 4pm or 5:15 pm

#### Peer

* Lords of the Flies, 7:30 pm April 22nd, 2:00 pm April 23rd, 2:00 9pm April 24th.  (Only 50-60 tickets per show)
* Second Annual Contra into Spring Dance, April 22nd, Main Quad, 7:30 p.m.
* R&B Soul Friday in Herrick at 7pm
* Drag, Saturday.  Bring money to give to the performers to give to charity.

#### Regular Peer 

* Social Dance Workshop Tuesdays 7:00-8:00 in Bucksbaum Dance Studio
* Post-break ExCo on British Politics Wednesdays at 8:00 in JRC 203.  
  Just show up; you don't need to sign up.
* Pun club Saturdays at 4pm in Younker 
* Electronic Potpourri on KDIC Fridays at Five 
* Space Odyssey KDIC Fridays at Six
* Bollywood, Fridays, 7:30-8:30, Younker
* Effective Altruism club, 2:30-3:30 Sundays in JRC 226.

#### Misc

#### Not so Far in the Future

* Adaptation of Rushdie's East West.  Early May.
* Is anyone in 25th Annual Putnam County Spelling Bee?

### Questions

Lab
---

Apply vs. map example

* `map` and `apply` both take a procedure and a list as inputs.
* `map` applies the procedure to each element, one at a time, and
  creates a new list.
* `apply` takes all of the list elements as input to one function call.
* Examples

        > (map list (list 1 2 3 4))
        '((1) (2) (3) (4))
        > (apply list (list 1 2 3 4))
        '(1 2 3 4)

Exercise 2: Which do you prefer?

* `v4`: It's concise
* `v4`: It's the most readable
* `v2`: It's the most readable

Exercise 3: Dot-Product

* Note that your solution is probably very close to what's on the board.
* If your brain is sufficiently mangled, this is kinda fun.

        (define dot-product (compose (l-s apply +)
                                     (section map * <> <>)))

Exercise 4:

Exercise 5: Please write up this exercise

