EBoard 23: Recursion (Section 2)

Please follow the standard start-of-class routine.

Warning! You are being recorded (and transcribed) (provided the technology is working correctly).

Approximate overview

  • Administrivia
  • Pop quiz
  • Lab

Administrative stuff

Introductory Notes

  • If you haven’t done so already, feel free to grab a halloween duck from the back of the room
  • We’re back to the “Sam talks less” experiment.
  • I’m also continuing the “pop quiz” experiment.
  • Today’s lab is likely too long, even with “Sam talks less”.
  • The second redo of MP1 is now due a week from tomorrow. The first redo should be returned by Sunday.
  • MP4 will be ready tonight. It involves writing lots and lots of recursive functions that process lists of colors. (Getting all the details right is taking a bit more time than I’d been able to allocate.)

Upcoming work

Upcoming activities

Scholarly

  • Thursday, 29 October 2026, 11:00 a.m.–Noon, JRC 101. Scholars’ Convocation: Dan Reynolds on Are We There Yet? The Humanities as a Journey
  • Thursday, 29 October 2026, 4:15–5:15 p.m., Noyce 3821. CS Extras: Student presentations
  • Tuesday, 3 October 2026, Noon–1:00 p.m., JRC 224C (I think). CS Table

Artistic/Cultural

  • Any day. Visit the GCMOA for at least 30 minutes.
  • Thursday, 29 October 2026, Noon–1:00 p.m. Bucksbaum 263 - Fitzgibbons Music Seminar. Total Immolation: Gamelan Towards the Collapse of the Sun.
  • Thursday, 29 October 2026, 4:00–5:30 p.m., Wall Theatre. Acting Through Musical Song Workshop with Rachel Kelsey
  • Saturday, 31 October 2026, 7:30–10:30 p.m., Harris Cinema. RHPS
  • Saturday, 31 October 2026, 8:00–9:00 p.m., Gardner. James Ivy and Band
  • Saturday, 31 October 2026, 8:00–9:30 p.m., Herrick. Halloween “Spooktacular” Organ Concert (I’m not sure which organs they are playing; perhaps hearts and lungs.)

Multicultural

  • Friday, 30 October 2026, 4:10–5:00 p.m., HSSC N1170. Middle of Everywhere (Chinese Ghosts)

Peer

Musical, theatric, sporting, academic, and similar events involving this section’s students are welcome.

  • Saturday, 31 October 2026, 11:00 a.m.–1:00 p.m., Springer Field. Men’s Soccer vs. Cornell College (last home match of the season)

Wellness

  • Monday, 2 November 2026, 8:00–9:00 p.m., Prayer Garage in the CRSSJ. Meditation Group
  • Tuesday, 3 November 2026, 12:15–12:45 p.m., GCMoA. Yoga in the Museum
  • Tuesday, 3 November 2026, 4:30–6:00 p.m., Bear P103. Wellness Yoga
  • Tuesday, 10 November 2026, 5:00–8:00 p.m., HSSC North Auditorium. Therapy Dogs

Misc

  • Fill out the College AI survey at https://bit.ly/ACM-AI-Survey. There’s no need to submit evidence; just a reflection.
    • Friday deadline.
  • Wednesday, 28 October 2026, 4:30–6:30 p.m., Burling. Open Education Trick or Treat
  • Wednesday, 28 October 2026, 4:30–6:30 p.m., Harris Concert Hall. Grinnell Gathers: Volunteer Fair
  • Wednesday, 28 October 2026, 5:00–7:00 p.m., JRC 209. QuestBridge Slime Event
  • Wednesday, 28 October 2026, 8:00–9:00 p.m., Science 3820. Mentor Session
  • Thursday, 29 October 2026, 8:00–9:00 p.m., Science 3820. Mentor Session

Other good things

These do not earn tokens, but are worth your consideration.

  • Friday, 30 October 2026, 7:00–9:00 p.m. Darby Gym. Volleyball vs. Beloit
  • Saturday, 31 October 2026, 1:00–3:00 p.m. Darby Gym. Volleyball vs. Lake Forest (senior day)
  • Saturday, 31 October 2026, 1:30–3:30 p.m., Springer Field. Women’s Soccer vs. Cornell College (last home match of the season)

Pop quiz

  • Strings: What are the parameters to string-split?
  • Lists: How do you determine if a list is empty?
  • Characters: How do we determine the collating sequence of a character?
  • Strings: What are three functions that make strings?
  • Anonymous functions: Rewrite (lambda (x) (string-append "X" x)) with l-s or r-s.

Lab

When it says “Document, write tests for, and implement”, we’d prefer that you do things in that order.

  • Documenting helps you make sure you know what the function should do.
  • Writing tests helps you think even more carefully about such issues.
  • Evidence suggests we are more likely to write correct code if we’ve thought about what the procedure should do before we implement the procedure. (Overall, we’re more efficient.)

Note: my-length should use lst not 1st.

Thinking about alphabetically-first

  • Example 1: (alphabetically-first (list "eh" "bee" "see"))
    • Recursive call will be (alphabetically-first (list "bee" "see"))
    • Recursive result will be “bee”. (Trust the MRF)
    • We return ??? because ….
  • Example 2: (alphabetically-first (list "a" "c" "b"))
    • Recursive call will be (alphabetically-first (list "c" "b"))
    • Recursive result will be “b”. (Trust the MRF)
    • We return ??? because ….