Next: Fixed Point Theorems Up: Class notes 22 Previous: Class notes 22

The Structure of Lisp and Scheme

One way to view a programming language is to distinguish its control from its data. Graphically

Programming Language = Control + Data

Lisp and Scheme are characterized roughly as ``untyped'' programming languages whose control mechanism is based on the lambda calculus. This is suggestive, and we explore the idea in more detail. It will turn out that these languages have one data type, Sexpression, and a control mechanism that extends the lambda calculus (unnecessarily).

The control mechanism decomposes into function evaluation, conditionals and recursive function definition. Graphically

The conditional is written but a simple binary case, the if_then_else is sufficient. It turns out that this can be defined. First we consider a version that works for lazy evaluation.

Exercise: Define an eager version of a conditional (recall lecture solution).



pavel@
Tue Nov 1 08:15:18 EST 1994