sicp.io
Back to the course

Chapter 3 · Modularity, Objects, and State

21 runnable lessons across 5 sections of the original book.

Start

Section 3.1 · Assignment and Local State

4 lessons

  1. 3.1.1A procedure can remember what happened.Open lesson
  2. 3.1.2A private location can turn a protocol into a reusable object.Open lesson
  3. 3.1.3A seed makes changing output reproducible.Open lesson
  4. 3.1.4The same expression can stop meaning the same computation.Open lesson

Section 3.2 · The Environment Model of Evaluation

4 lessons

  1. 3.2.1Evaluation follows expressions while lookup follows frame links.Open lesson
  2. 3.2.2Each application adds one frame to a specific parent.Open lesson
  3. 3.2.3Each closure can own a private location.Open lesson
  4. 3.2.4Internal names can describe one cooperating local program.Open lesson

Section 3.3 · Modeling with Mutable Data

6 lessons

  1. 3.3.1Changing one cdr can reshape every path that reaches it.Open lesson
  2. 3.3.2A queue keeps both ends within reach.Open lesson
  3. 3.3.3A table mutates records while lookup keeps the representation private.Open lesson
  4. 3.3.4Wires notify gates, and an agenda turns delay into simulated time.Open lesson
  5. 3.3.5An agenda makes simulated time explicit.Open lesson
  6. 3.3.6A constraint propagates knowledge in either direction.Open lesson

Section 3.4 · Concurrency and Time

3 lessons

  1. 3.4.1The same updates can differ when reads and writes interleave.Open lesson
  2. 3.4.2A serializer makes one state transition finish before the next begins.Open lesson
  3. 3.4.3A shared lock order can remove one explicit circular wait.Open lesson

Section 3.5 · Streams

4 lessons

  1. 3.5.1A promise computes once and remembers the value.Open lesson
  2. 3.5.2A stream reveals only the part you demand.Open lesson
  3. 3.5.3A numerical process can become a stream of improving observations.Open lesson
  4. 3.5.4One recurrence can appear as a changing object or an immutable stream.Open lesson

Chapter checkpoint

Reconnect the chapter’s key ideas before moving on.

Review