Skip to main content



Lecture Notes

The notes linked below are required reading, but they are not a substitute for attending lecture and recitation. The lectures and recitation sections are tightly coupled: Lectures will assume knowledge from previous sections, and vice-versa. These notes should be read sequentially (Monday's section, Tuesday's lecture, Wednesday's section, Thursday's lecture, etc.).

Lecture topics and assignment due dates are subject to change.

DATE EVENT TOPIC LINKS
Introduction to Functional Programming
8/23 Lecture 1 Course overview and background on OCaml [Slides
8/23 PS 1 issued [PS 1
8/23 OCaml demo 7–9pm Upson B7
8/24 OCaml demo 7–9pm Upson B7
8/27 Recitation 1 Introduction to OCaml syntax [Notes] [Slides
8/28 Lecture 2 OCaml syntax and evaluation [Notes
8/29 Recitation 2 Tuples, records, and pattern matching [Notes] [Slides] [Code
8/30 Lecture 3 Lexical scope [Notes
9/3 Recitation 3 Labor day; no class
9/4 Lecture 4 Guest Lecture: Currying, Induction by Nate Foster
9/5 Recitation 3 Higher-order functions, anonymous functions, currying, side effects, printing, exceptions [Notes
9/6 Lecture 5 Quiz 1; Induction [Notes
9/6 PS1 due at 11:59PM; PS2 issued (due 9/20) [PS2
9/10 Recitation 4 Folding and tail recursion [Notes
Data Structures and Programming Models
9/11 Lecture 6 Parameterized types, map, and fold [Notes
9/10 Recitation 5 Pattern-matching pitfalls, more parameterized types [Notes
9/13 Lecture 7 Substitution Model [Notes
9/17 Recitation 6 More on the substitution model [Notes
9/18 Lecture 8 Inductive proofs of program correctness [Notes
9/19 Recitation 7 Inductive proofs of program correctness [Notes
9/20 Lecture 9 Shortest paths [Notes
9/20 PS2 due; PS3 issued [PS3
9/24 Recitation 8 Dijkstra's Algorithm
9/25 Lecture 10 Modules
9/26 Recitation 9 Modules [Notes
9/27 Lecture 11 Tries [Notes
10/1 Recitation 10 Prelim review
10/2 Lecture 12 Red-black trees [Notes
10/2 Prelim Exam 7:30–9 pm, Thurston Hall 203/205
10/3 Recitation 11 Prelim debrief
Concurrency and Side Effects
10/4 Lecture 13 Streams and Lazy Evaluation [Notes
10/4 PS3 due; PS4 issued [PS4
10/10 Recitation 12 Refs, more side effects in OCaml [Notes
10/11 Lecture 14 Guest Lecture: Nate Foster [Notes
10/15 Recitation 13 Environment Model [Notes
10/16 Lecture 15 Concurrent Programming [Notes
10/17 Recitation 14 Disjoint Sets [Notes] [Code
10/18 Lecture 16 Guest Lecture: Yaron Minsky [Effective OCaml
10/18 PS4 due; PS5 issued [PS5
10/22 Recitation 15 PS5 overview
10/23 Lecture 17 Concurrent Programming [Notes
10/24 Recitation 16 Threads, Condition Variables [Notes
10/25 Lecture 18 Hashing [Notes] [Botelho] [Cichelli] [CMU
Data Structures and Analysis of Algorithms
10/29 Recitation 17 Basics complexity, recurrences [Notes
10/30 Lecture 19 Amortized Analysis [Notes
10/31 Recitation 18 Master Method [Notes] [Proof of Master Method
11/1 Lecture 20 Locality [Notes
11/5 Recitation 19 Prelim 2 Review
11/6 Lecture 21 B Trees [Notes
11/7 Recitation 20 Splay Trees & B Trees [Splay Trees] [Code] [B-Trees
11/8 Lecture 22 Garbage Collection [Notes
11/8 PS5 due; PS6 issued [PS6
11/12 Recitation 21 CPS, PS6 overview [Notes
11/13 Lecture 23 Abstraction & Verification [Notes
11/13 Prelim Exam 7:30–9 pm, Upson B17
Other Topics
11/14 Recitation 22 Prelim debrief, PS6 overview
11/15 Lecture 24 The Lambda Calculus [Notes
11/19 Recitation 23 Lambda Calculus Encodings [Notes
11/20 Lecture 25 Guest lecture by Ross Tate
11/26 Recitation 24 Amorized Analysis Review [Notes
11/27 Lecture 26 Big Data [Notes
11/28 Recitation 25 Combinators, final review
11/29 Lecture 27 Computability [Notes
11/30 PS6 due
12/5 Final Exam, 7–9:30 pm, 305 Ives