September 22, 1999 | Perl and the Lambda Calculus | Slide #26 |

There are many ways to make numbers. Here's a simple one

Idea: Represent numbers with lists

ZERO = (PAIR TRUE TRUE)

SUCC =n.(PAIR FALSEn)

IS_ZERO =n.(FIRSTn)

PRED =n.(SECONDn)

Next | Copyright © 1999 M-J. Dominus |