Skip to content

Instantly share code, notes, and snippets.

@yakreved
Created August 13, 2013 07:19
Show Gist options
  • Save yakreved/6218633 to your computer and use it in GitHub Desktop.
Save yakreved/6218633 to your computer and use it in GitHub Desktop.
sicp 2.4
(define (cons x y)
(lambda (m) (m x y)))
(define (car z)
(z (lambda (p q) p)))
(define (cdr z)
(z (lambda (p q) q)))
(car (cons 1 2))
(car (cons 3 5))
(cdr (cons 1 2))
(cdr (cons 3 5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment