EBoard 23: Pairs and Pair Structures

Approximate overview

  • Admin
  • Quick notes on Pairs reading self checks
  • Lab

Administrative stuff

Introductory notes

  • Welcome back!
  • It appears that October Mondays are rainy.
  • SoLA 2 returned Sunday night. Let me know if you have questions (via DM or email).
  • I did not catch up on other grading. Sorry!
  • The schedule has shifted slightly. We are doing dictionaries and hash tables on Wednesday. Make sure you do the right reading.
  • In case you weren’t sure, I hate our projection system!

Upcoming activities

Events

  • Today at 4pm in 3821: Monday Extras
  • Tuesday at 2pm in 3821: Chike Abuah ‘14 on security and grad school
  • Tuesday at 8pm (?): Mentor Session
  • Wednesday at 7pm (?): Mentor Session
  • Swim meet Saturday at 1pm.

Other good things

  • ?

Upcoming work

Q&A

Quick notes on Pairs reading self checks

Lab

Preparation

  • Make sure that you have the correct lab page.
  • Person closest to the screen is A. Other person is B.
  • Make sure to have the pre-class discussion.
  • Review the procedures in the lab, too.

Notes during class

Dots

  • A dot means “You may think it’s a list, but it’s not.”
  • The dot only appears before the last element of a not-quite-list pair structure.

listp?

  • Use the definition of list!
  • A list is either
    • Null
    • A pair of anything and a list

int-list->string

  • Use a (recursive) helper!
  • Main procedure:
    • If it’s empty, return “()”
    • If it’s not empty, return “(“ + the first element + call to helper
  • Helper