An implementation of cons, car, and cdr
Posted On Saturday, December 01, 2007 at at 8:11 PM by mjWe can build rational numbers and line segments and vectors and all of this stuff in terms of pairs ... out of nothing at all--pure abstraction.- Hal Abelson, SICP video lecture 2b
(define (cons a b)
(lambda (pick)
(cond ((= pick 1) a)
((= pick 2) b))))
(define (car x) (x 1))
(define (cdr x) (x 2))
Practical? Who cares! Learning stuff like this is an antidote to this:
- Create table
- Create DAO
- Create View
- Create template
- Sync changes
- Deploy