Some problems are not easily solved using structural decomposition as we've defined it. Others are solved only inefficiently by pure structural decomposition. We introduce two new kinds of generalization to help solve such problems. We introduce invariants as a way of recording the assumptions that a function makes about its environment.

Part VI from the textbook. We are doing things in a different order than the textbook does. Also, we are doing this topic rather differently than the textbook does, so use the textbook for background rather than as a normative reference.

- Examples for Week 07
- bad-daughters.rkt
In-Class Exercise for Module 07

- Lesson 7.1 Solving Your Problem by Generalization (PDF)
- Lesson 7.2 More Examples of Invariants (PDF)
- Guided Practice 7.1
- Lesson 7.3 Case Study-- Free Variables (PDF)
- Guided Practice 7.2
- Lesson 7.4 When do I need an invariant? (PDF)
- Lesson 7.5 Foldr and Foldl (PDF)
- Lesson 7.6 Context Arguments and Performance (PDF)

Problem Set 07 was assigned Monday, 29 February.

Last modified: Mon Feb 22 2016