Created
July 30, 2014 17:55
-
-
Save jwhiteman/34d447a0d249d2e29035 to your computer and use it in GitHub Desktop.
2 arg Y
This file contains 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
(define y2 | |
(lambda (c) | |
((lambda (h) | |
(h h)) | |
(lambda (f) | |
(c (lambda (x y) | |
((f f) x y))))))) | |
(define make-rember | |
(y2 (lambda (f) | |
(lambda (a l) | |
(cond | |
((null? l) '()) | |
((eq? (car l) a) | |
(f a (cdr l))) | |
(else | |
(cons (car l) | |
(f a (cdr l))))))))) | |
(make-rember 'c '(a c d c)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment