-
-
Save eugeneia/ddee65d54f1504521de080dde19ad2a6 to your computer and use it in GitHub Desktop.
Y combinator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; See http://mvanier.livejournal.com/2897.html | |
(define Y | |
(lambda (f) | |
((lambda (x) (f (lambda (y) ((x x) y)))) | |
(lambda (x) (f (lambda (y) ((x x) y))))))) | |
;;;; Equivalent: | |
(define Y | |
(lambda (f) | |
((lambda (x) (x x)) | |
(lambda (x) (f (lambda (y) ((x x) y))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment