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
;; let1 | |
(define-syntax letone | |
(syntax-rules () | |
((_ () body ...) | |
(let () | |
body ...)) | |
((_ (var init) body ...) | |
(let ((var init)) | |
body ...)))) | |
(letone (x 10) | |
(display x)) | |
(letone () | |
(display 1))) |
追記
間違ってるな。
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 letone | |
(syntax-rules () | |
((_ var init body ...) | |
(let ((var init)) | |
body ...)))) | |
(letone a 1 | |
(display a)) |
0 件のコメント:
コメントを投稿