COMS W4115
Programming Languages and Translators
Lecture 25: April 23, 2014
The Lambda Calculus - II

Outline

1. The Church-Rosser Theorems

2. The Y Combinator

3. Implementing Factorial using the Y Combinator

4. Church Numerals

5. Arithmetic

6. Logic

7. Other Programming Language Constructs

8. The Influence of the Lambda Calculus on Functional Languages

9. Practice Problems

  1. Evaluate ((λx.((λw.λz. + w z)1)) ((λx. xx)(λx. xx))) ((λy. * y 1) (- 3 2)) using normal order evaluation and applicative order evaluation.
  2. Give an example of a code optimization transformation that has the Church-Rosser property.
  3. Evaluate FAC 2.
  4. Evaluate succ two.
  5. Evaluate add two three.
  6. Let mul be the function
  7. Evaluate mul two three.
  8. Write a lambda expression for the boolean predicate isZero and evaluate isZero one.

10. References



aho@cs.columbia.edu