Created
November 28, 2013 07:16
-
-
Save zeptometer/7688329 to your computer and use it in GitHub Desktop.
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
| (define-syntax let | |
| (rsc-macro-transformer | |
| (lambda (form mac-env) | |
| (if (symbol? (cadr form)) | |
| ((lambda (name bindings body) | |
| (list (make-syntactic-closure mac-env '() 'let) | |
| '() | |
| (list (make-syntactic-closure mac-env '() 'define) | |
| name | |
| (cons (make-syntactic-closure mac-env '() 'lambda) | |
| (cons (map car bindings) | |
| body))) | |
| (cons name (map cadr bindings)))) | |
| (cadr form) | |
| (caddr form) | |
| (cdddr form)) | |
| ((lambda (bindings body) | |
| (cons (cons (make-syntactic-closure mac-env '() 'lambda) | |
| (cons (map car bindings) | |
| body)) | |
| (map cadr bindings))) | |
| (cadr form) | |
| (cddr form)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment