1 of 11

Sequencing

& Effects

CSC 151 - Functional Problem Solving

Leah Perlmutter | Fall 2024

2 of 11

Agenda for Today

  1. Announcements
  2. Sequencing & Effects
  3. Lab

3 of 11

Announcements

4 of 11

Announcements

  • Election stress is real!
    • Make plenty of space for self care
  • CS Extras: Decision Diagrams Theory and Applications
    • Prof. Gianfranco Ciardo, Iowa State University
    • Thurs 11/7
      • 4:00 pm snacks in Noyce 3817
      • 4:15 pm talk in Noyce 3821

5 of 11

Announcements

  • Quiz Friday on Dictionaries (Association Lists)
    • remember that many dictionary manipulation operations require recursion
    • the quiz might or might not require recursion

  • Heads up: It gets harder from here!
  • Assessment revisions
    • start with the earliest material
    • start early

6 of 11

Program State

  • Self check
  • to trace a let binding
    • first we evaluate the expression for each binding
    • then we substitute in each name for its value in the body of the let expression

7 of 11

Terms

  • purity
    • A pure functional program is one that has no side effects
  • referential transparency
    • An expression is referentially transparent if it can be replaced by the value that it evaluates to without any change in meaning to our program.

This lab is about working with non-pure programs that don't have referential transparency. We need to track state.

8 of 11

Before we begin

  • Suggested Ice Breaker: What have you been doing for self care recently?

9 of 11

Lab time!

10 of 11

Lab Tips

11 of 11

End of lab

  • 5 minutes left -- make a plan to finish your lab exercises!
  • Before submitting, make a comment in your lab code saying how far you got through the exercises
  • check course website for assignments and due dates
  • When you go, put note cards back in bin if you have not already