15-212: Principles of Programming |
We discuss the method of structural induction on recursively defined types. This technique parallels standard induction on predicates, but has a unique character of its own, and arises often in programming.
We also discuss tail recursion, a form of recursion that is somewhat like the use of loops in imperative programming. This form of recursion is often especially efficient and easy to analyze. Accumulator arguments play an important role in tail recursion.
As examples we consider recursively defined lists and trees.
[ CS 15-212 Home page | schedule | language | assignments | handouts ]