15-150: Principles of Functional Programming
Lecture 5: Datatypes, Recursion and Structural Induction on Trees
We showed how to create some user-defined tree datatypes.
We showed how to prove theorems about trees using structural induction.
Key Concepts
- datatype declarations
- trees defined recursively
- datatype declaration of trees
- correspondence between recursive datatype, recursive function
clauses, and proof by structural induction