EBoard 31: Higher-order programming (Section 2)

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

Approximate optimistic overview

  • Administrative stuff
  • Talk about the reading
  • Q&A
  • Lab

Administrative stuff

Introductory notes

  • Apologies
  • Please make more use of the evening tutors!
  • Your mentor will be returning quizzes (I hope).
  • Welcome to our visitor!

Upcoming activities

Scholarly

  • Tuesday, 22 April 2025, noon–1pm, White PDR. CS Table: ???

Artistic

  • Saturday, 19 April 2025, Noon–4:00 p.m., Central Campus. SpringFest
  • Saturday, 19 April 2025, 7:30–9:30 p.m., Harris Concert Hall. Titular Head
  • Monday, 21 April 2025, 4:00–5:00 p.m., GCMoA. Poetry Reading by Lívia Stein Freitas

Multicultural

  • Friday, 18 April 2025, 4:00–5:00 p.m., HSSC N1170 (Global Living Room). Middle of Everywhere: Northern & Southern China on a Plate (Breakfast)
  • Friday, 18 April 2025, 6:00 p.m.–Midnight, Harris Gym. SOL Quinceañera
    • Tickets are required for the food.
  • Saturday, 19 April 2025, 1:00–4:00 p.m., HSSC A1231 (Multi-purpose Kernel). Japanese Spring Festival
  • Saturday, 26 April 2025, 1:00–8:30 p.m., Cleveland Beach. Holi

Peer

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

  • Read articles by your fellow CSC-151 students and comment on them online.
  • Saturday, 19 April 2025, 9:00 a.m.–Noon, Tennis Courts. Men’s Tennis vs. Ripon
  • Saturday, 19 April 2025, 3:00–6:00 p.m., Tennis Courts. Men’s Tennis vs. Lawrence

Wellness

  • Friday, 18 April 2025, 6:00–8:00 p.m., Aux Gym. Badminton Club (Smash that bird!)
  • Friday, 18 April 2025, 6:30–8:00 p.m. Dance Studio. Brazilian Jiu-Jitsu
  • Friday, 18 April 2025, 9:00 p.m., Noyce Elbow. Nerf at Noyce.
  • Saturday, 19 April 2025, 4:00–6:00 p.m., Aux Gym. Badminton Club (Smash that bird!)
  • Monday, 21 April 2025, 6:30–8:00 p.m. Dance Studio. Brazilian Jiu-Jitsu
  • Tuesday, 22 April 2025, 12:00–12:45 p.m., Dance Studio. HIIT Training.
  • Tuesday, 22 April 2025, 12:15–12:50 p.m., GCMoA. Yoga in the Museum.
  • Tuesday, 22 April 2025, 4:30–6:30 p.m., BRAC P103 (Multipurpose Dance Studio). Wellness Yoga.
  • Wednesday, 16 April 2025, 6:30–8:00 p.m., Dance Studio. Brazilian Jiu-Jitsu
  • Thursday, 17 April 2025, 12:00–12:45 p.m., Dance Studio. HIIT Training.
  • Thursday, 17 April 2025. 4:30–6:30 p.m., Off Campus. Forest Bathing.
    • Sign ups are required.
  • Tuesday, 29 April 2025, 5:00–6:00 p.m., HSSC Atrium. Therapy Dogs.
  • Tuesday, 29 April 2025, 7:15–8:15 p.m., HSSC Atrium. Therapy Dogs.

Misc

  • Sunday, 20 April 2025, 7:30–8:30 p.m., Science 3819. Mentor Session: SoLA 3
  • Tuesday, 22 April 2025, 7:00–8:00 p.m., Science 3820. Mentor Session: Quiz prep
  • Wednesday, 23 April 2025, Noon–1:00 p.m., HSSC A2231 (Auditorium) Community Forum
    • “Weekly discussion on legal protections and recourse on issues that higher education and Grinnell College face.”
    • Also online.
    • This week: ???

Other good things

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

Upcoming work

  • Friday, 18 April 2025
  • Sunday, 20 April 2025
  • Monday, 21 April 2025
    • SoLA 3 distributed
      • Topics from phase one: Decomposition, Primitive types, Collaboration, Lambda-free anonymous procedures (aka cut and compose).
      • Topics from phase two: Conditionals, Documentation, Testing, Lists (and “the big three”), Program Style, Ethical Considerations
      • Topics from phrase three you’ve done quizzes on: List recursion, local bindings.
      • New topics from phase three: Numeric recursion, vectors, randomness.
  • Wednesday, 23 April 2025
    • Quiz: Data abstraction / structs
    • Makeup quiz: Dictionaries
    • Makeup quiz: Diagramming structures (paper only)
    • Don’t forget that you can bring a page of hand-written notes for each quiz.
  • Thursday, 24 April 2025
    • SoLA 3 due
      • Topics from phase one: Decomposition, Primitive types, Collaboration, Lambda-free anonymous procedures (aka cut and compose).
      • Topics from phase two: Conditionals, Documentation, Testing, Lists (and “the big three”), Program Style, Ethical Considerations.
      • Topics from phrase three you’ve done quizzes on: List recursion, local bindings.
      • New topics from phase three: Numeric recursion, Vectors, Randomness
  • Sunday, 27 April 2025
    • Submit first redo for MP7 on Gradescope
  • Friday, 16 May 2025
    • Submit final redo for MP1 on Gradescope
    • Submit final redo for MP2 on Gradescope
    • Submit final redo for MP3 on Gradescope
    • Submit final redo for MP4 on Gradescope
    • Submit final redo for MP5 on Gradescope

Friday PSA

  • You are wonderful people.
  • Others care about you.
  • Please take care of yourselves.
  • “It’s Friday, I’m in love.”
    • Consent is essential, but not sufficient.

Readings

TPS

What are the big ideas? (There are at least three.)

  • UM: Universal Methods. We can write the big three list procedures.
  • We can write procedures that take other procedures as parameters.
  • We can write procedures, like right-section or make-multiplier, that return procedures.

How would you write filter?

(define filter 
  (lambda (pred? lst)
    (cond
      [(null? lst)
       null]
      [(pred? (car lst))
       (cons (car lst) (filter pred? (cdr lst)))]
      [else
       (filter pred? (cdr lst))])))

Can you explain how to write map or filter using fold?

At the end of class.

Questions

Questions

Administrative

Will dictionaries be on SoLA 3?

No.

Will dictionaries be on SoLA 4?

Yes.

Will SoLA 4 be the final SoLA?

No. However, it will be the last SoLA with new topics.

SoLA 5, due at the end of finals week, gives you one last chance.

Readings

Can we go over the self check?

Sure.

Lab

Note: Trust the magic recursion fairy! “Suppose our recursive call succeeds. What next?”

Can you explain how to write map or filter using fold?

(define fmap
  (lambda (fun lst)
    (foldr (lambda (val rest)
             (cons (fun val) rest))
           null
           lst)))

(define ffilter
  (lambda (pred? lst)
    (foldr (lambda (val rest)
             (if (pred? val)
                 (cons val rest)
                 rest))
           null
           lst)))