Created
April 17, 2014 10:08
-
-
Save NalaGinrut/10970786 to your computer and use it in GitHub Desktop.
A macro for multi assign
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 sets! | |
(syntax-rules () | |
((_ (var) (val)) | |
(set! var val)) | |
((_ (var vars* ...) (val vals* ...)) | |
(let ((var0 val)) | |
(sets! (vars* ...) (vals* ...)) | |
(set! var var0))))) |
Author
NalaGinrut
commented
Apr 17, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment