Created
March 27, 2010 01:34
-
-
Save ecounysis/345615 to your computer and use it in GitHub Desktop.
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-syntax let2 | |
(syntax-rules () | |
[(_ ((var val) ...) (exp ...)) | |
((lambda (var ...) (exp ...)) val ...)])) | |
(define-syntax let2* | |
(syntax-rules () | |
[(_ ([x1 v1]) e ...) (let2 ([x1 v1]) e ...)] | |
[(_ [(x1 v1) (x2 v2)] (e ...)) | |
[let2* ((x1 v1)) (let2* ((x2 v2)) (e ...))]] | |
[(_ [(x1 v1) (x2 v2) ...] (e ...)) | |
[let2* ((x1 v1)) (let2* ((x2 v2) ...) (e ...))]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment