Skip to content

Instantly share code, notes, and snippets.

@kouddy
Last active August 29, 2015 14:17
Show Gist options
  • Save kouddy/73ace7b885252c7243dd to your computer and use it in GitHub Desktop.
Save kouddy/73ace7b885252c7243dd to your computer and use it in GitHub Desktop.
;;;zero
(define zero (lambda (f) (lambda (x) x)))
(((lambda (f) (lambda (x) x)) square) 100)
((lambda (x) x) 100)
100
;;;one
(((lambda (f) (lambda (x) (f ((zero f) x)))) square) 100)
((lambda (x) (square ((zero square) x))) 100)
(square ((zero square) 100))
(square ((lambda (x) x) 100))
(square 100)
10000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment