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

Outline

1. The Influence of the Lambda Calculus on Programming Languages

2. The Church-Rosser Theorems

3. The Y Combinator

4. Implementing Factorial using the Y Combinator

5. Church Numerals

6. Arithmetic

7. Logic

8. Other Programming Language Constructs

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