Homework 8. ML.

The goal of this homework is to give you experience in writing simple programs using ML. Type your solutions into ML interpretor.

Problem 1. Given the definition of type {\em bitree}, define functions to a) compute the height of the tree; b) compute total number of nodes in the tree.

Problem 2. Define the S, K and I combinators for the definition of lambda-calculus using ML (see Lecture 17).

Problem 3. Sethi 9.9, 9.5. Use pattern matching.