sicp.io
Back to the course

Chapter 2 · Building Abstractions with Data

20 runnable lessons across 5 sections of the original book.

Start

Section 2.1 · Introduction to Data Abstraction

4 lessons

  1. 2.1.1Build with an interface, not a representation.Open lesson
  2. 2.1.2Data can be the behavior promised by an interface.Open lesson
  3. 2.1.3Shared structure makes mutation visible at a distance.Open lesson
  4. 2.1.4Selectors separate interval representation from calculation.Open lesson

Section 2.2 · Hierarchical Data and the Closure Property

5 lessons

  1. 2.2.1A list is a chain and a convention.Open lesson
  2. 2.2.2The recursion follows the shape of the data.Open lesson
  3. 2.2.3Name each stage, then compose the flow.Open lesson
  4. 2.2.4A painter maps a frame to a finite set of segments.Open lesson
  5. 2.2.5A geometric transform returns another painter.Open lesson

Section 2.3 · Symbolic Data

5 lessons

  1. 2.3.1Quotation turns program-shaped text into inspectable data.Open lesson
  2. 2.3.2A differentiation rule can transform an expression tree.Open lesson
  3. 2.3.3One set interface can exploit several structural promises.Open lesson
  4. 2.3.4Ordering changes what a set operation can skip.Open lesson
  5. 2.3.5The tree makes frequent symbols cheaper.Open lesson

Section 2.4 · Multiple Representations for Abstract Data

3 lessons

  1. 2.4.1One complex number can keep two useful coordinate systems.Open lesson
  2. 2.4.2A type tag chooses the representation-specific operation.Open lesson
  3. 2.4.3A package extends the table instead of editing every caller.Open lesson

Section 2.5 · Systems with Generic Operations

3 lessons

  1. 2.5.1Raise for a shared method, then drop only when information survives.Open lesson
  2. 2.5.2A generic operation can move values to a common representation.Open lesson
  3. 2.5.3A polynomial package turns algebra into operations on tagged data.Open lesson

Chapter checkpoint

Reconnect the chapter’s key ideas before moving on.

Review