(define cons (lambda (hd tl) (lambda (sel) (sel hd tl)))) |
To be precise we should have said the new `pair'. But because a pair has a tail pointing normally to another pair, we effectively have a new list as well. This is true however only if the convention is followed that the last pair in the list has a tail-value of `nil'.
`nil' is a special abstraction required at the end of a list to be able to
determine the length of the list which depends on being able to recognize its end.
The abstraction `nil', also called the `empty list', is defined as follows:
(define nil (lambda (f) true)) |
Georg P. Loczewski 2004-03-05