Lesson 19: Closures and lambda

Outline:

  1. Recap: evaluating Scheme
    • environment model of evaluation
    • define, let, if
  2. Evaluating special form: lambda
  3. Wrap-up

After class

  1. Explore the rest of the exercises from today.

What’s next

Upcoming events/assessments:

  • Interpreter Parts 1+2 (linked list + talloc) cannot be resubmitted after tonight at 10pm
  • Interpreter Part 3 (tokenizer) cannot be resubmitted after Friday at 10pm
  • Quiz 5 will be this Friday and cover the following Quiz Learning Objectives:
    • Core:
      • PL 5: parse trees
      • PL 6: scoping
      • IP 4: parsing
    • Advanced:
      • IP 6: catching errors
    • Repeat:
      • FS 5: higher-order functions (CR)
      • IC 3: structs (CR)
      • IC 4: arrays (CR)
      • PL 7: side effects (AD)
      • FS 10: implementing higher-order functions (AD)
      • FS 12: writing Scheme (AD)
      • IC 8: writing C (AD)

What you should do now:

  • Read the assigned readings (see below)
  • Finish resubmitting Interpreter Parts 1–3 with more complete functionality, style fixes, etc.
  • Finish Interpreter Part 4: Parser
  • Start Interpreter Part 5: If/let/quote

Reading assignment (to be completed by the next class):

Lambda and closures (from today):

For next time:

  • nothing new, just study for Quiz 5 and (re-)read assignment writeups