Skip to content

SICP Programs

Exercises and programs from Structure and Interpretation of Computer Programs book

Chapter 1 - Building abstractions with procedures

Programs

Fibonacci Tree, Counting change, Exponent, GCD, Primality, Sigma function, Lambda, Half interval, Fixed point, Transformation

Exercises

1.1 Elements of Programming

1.2 Procedures and the Processes They Generate

1.3 Formulating Abstractions with Higher-Order Procedures

Chapter 2 - Building abstractions with data

Programs

Rational numbers, Sequences, Transforming list, Trees from list, Mapping over tree, Conventional interfaces, Nested mappings, Painter patterns, Painter higher order, Painter transformation, Symbolic differentiation, Sets as unordered list, Sets as ordered list, Sets as trees, Huffman tree, Complex numbers, Arithmetic package

Exercises

2.1 Introduction to Data Abstraction

2.2 Hierarchical Data and the Closure Property

2.3 Symbolic Data

2.4 Multiple Representations for Abstract Data

2.5 Systems with Generic Operations

Running the programs

Installing MIT Scheme on Mac

$ brew install mit-scheme

Installing DrRacket (for a few programs) on Mac

$ brew cask install racket

Running scheme programs

$ scheme < program_name.scm

Running racket programs

$ drracket program_name.rkt