Today, in the pre-recorded lecture, we’ll talk about the idea of lambda abstraction. How do we break a problem down into small parts…gradually building a program that is both powerful and flexible to solve problems.
Reminder: Watch the pre-recorded lecture and come to class ready to complete Tutorial 2!
Keep in mind that you’re free to skip around, watch at 2x speed, etc.. But if you’re confused about something, it might be a good idea to revisit that portion of the slides / lecture video.
Local defines
Nearly every language has a way of defining local variables to hold intermediate values. It’s another bread-and-butter programming thing. Unfortunately, the local expression is one of the uglier features of the Racket student languages. Most languages, including real Racket, have much less verbose ways of defining local variables.
The designers of the student language designed the local special form the way they did because they found it caused less confusion for new programmers than the alternatives. But in subsequent courses, you’ll find that you can add a new variable with a lot less typing, including in Racket.
Today's Resources
1. Exercise Files
Download Exercise Files2. Slides
3. Pre-Recorded Lecture Video(s), Mini-Quizzes, and Live Recordings
| Link | Title | Type | Duration |
|---|---|---|---|
| Video 0 | Lecture 6.1: Intro + Substitution Model | pre-recorded | 5:55 |
| Video 1 | Lecture 6.2: Making a Color Gradient | pre-recorded | 8:58 |
| Video 2 | Lecture 6.3: Lambda Abstraction | pre-recorded | 3:18 |
| Video 3 | Lecture 6.4: Making a Rotary Pattern | pre-recorded | 12:07 |
| Video 4 | Lecture 6.5: Local (MQ - No Longer Available) | video_quiz | 6:36 |
| Video 5 | Lecture 6.6: Grids Revisited | pre-recorded | 5:23 |
4. Supplemental Materials
Optional
- Abelson, Sussman, and Sussman - Structure and Interpretation of Computer Programs. Chp. 1.1.1 - 1.1.6 might be helpful!