*Discrete Mathematics and Functional Programming*

## Thomas VanDrunen

### Wheaton College (IL)

[home]
## Source code for examples and exercises

### Chapter 1: Relation

1.10 Making your own types.

1.11 Making your own operations

1.12 Recursive functions

1.13 Statements and exceptions

1.14 Extended example: A cumulative song

1.15 Special Topic: Comparison with object-oriented programming

### Chapter 2: List

2.1 Lists

2.2 Functions on lists

2.3 Datatypes that use lists

2.5 Case expressions and option types

2.6 Extended example: A language processor

### Chapter 3: Proposition

3.3 Boolean values

3.7 Conditional expressions

3.13 Quantification and algorithms

3.15 Extended example: Verifying
arguments automatically

### Chapter 4: Proof

4.10 From theorems to algorithms

4.11 Extended example: Solving games

### Chapter 5: Relation

5.2 Representation

5.6 Computing transitivity

5.7 Transitive closure

5.10 Extended example: Unification and resolution

5.11 Extended example: Unification and resolution

### Chapter 6: Self Reference

6.1 Peano numbers

6.2 Trees

6.3 Mutual recursion

6.7 Program correctness

6.8 Sorting

6.9 Iteration

6.10 Loop invariants

6.11 From theorems to algorithms, revisited

6.12 Extended example: Huffman encoding

6.12 Extended example: Huffman encoding, revised version.
You can get a PDF of the revised version of this section
here.

### Chapter 7: Function

7.3 Functions as first-class values

7.5 Map

7.11 Permutations and combinations

7.12 Currying

7.13 Fixed-point iteration

7.14 Extended example: Modeling mathematical functions

7.15 Special topic: Countability

### Chapter 8: Graph

8.6 Representing graphs

8.7 Extended example: Graph algorithms

### Chapter 9: Complexity Class

9.8 Tables

9.9 Memoization

9.10 Extended example: The Knapsack Problem

### Chapter 10: Lattice

10.5 Implementing lattice operations

10.7 Special topic: Digital logic circuits

### Chapter 11: Group

11.6 Extended example: RSA encryption

### Chapter 12: Automaton

12.2 Deterministic finite automata

12.3 Nondeterminism

12.5 Language model equivalence and limitations

12.7 Push-down automata

12.8 The lambda calculus

Thomas VanDrunen
Last modified: Tue Jul 28 16:16:08 CDT 2015