Remember that there are three ways of constructing a program in lambda calculus. It can either be a variable, an application and a lambda expression. This means that it can be represented in Haskell as a data type with three constructors. For instance the constructors Var, Apply and Lambda. What should the argument of these constructors be?

Well, Var should represent a variable, we could use a string for that. Apply takes two programs as arguments and finally Lambda takes a variable (i.e. a string) and a program.

Last modified: Wed Oct 29 10:07:43 KST 2003