Created
December 23, 2008 17:20
-
-
Save joelmccracken/39384 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 begin2 | |
(syntax-rules () | |
[(begin2 a) (a)] | |
[(begin2 a b ...) ((begin3 b ...) a)])) | |
(define-syntax begin3 | |
(syntax-rules () | |
[(begin3 a) (lambda (unique-plz) a)] | |
[(begin3 a b ...) (lambda (unique-plz) ((begin3 b ...) a))])) | |
; example code, displaying the abilities of function composition and macros. | |
(begin2 (display "1") (display "2") (display "3") (display "4") (display "5") (display "6") (+ 2 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment