Created
July 13, 2014 13:05
-
-
Save zeptometer/111680f345c279ac679b 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
(syntax-rules () ((when test stmt1 stmt2 ...) (if test (begin stmt1 stmt2 ...)))) | |
; expand to | |
(er-macro-transformer@187 | |
(lambda (expr rename cmp) | |
(let@265 ((test/0 ()) (stmt1/0 ()) (stmt2/1 ())) | |
(let@265 ((result (call/cc@152 (lambda (exit) (let@265 ((expr (cdr@8 expr))) (begin (if (pair?@5 expr) (let@265 ((expr (car@7 expr))) (set! test/0 expr)) (exit #f)) (if (pair?@5 (cdr@8 expr)) (let@265 ((expr (car@7 (cdr@8 expr)))) (set! stmt1/0 expr)) (exit #f)) (let@265 ((expr (let@265 loop ((a ()) (d (cdr@8 (cdr@8 expr)))) (if (pair?@5 d) (loop (cons@6 (car@7 d) a) (cdr@8 d)) (cons@6 d a))))) (begin (let@265 ((expr (car@7 expr))) (if (not@3 (eqv?@1 '() expr)) (exit #f))) (let@265 ((expr (cdr@8 expr))) (let@265 loop ((expr expr)) (if (not@3 (null?@15 expr)) (let@265 ((stmt2/0 '())) (let@265 ((expr (car@7 expr))) (set! stmt2/0 expr)) (set! stmt2/1 (cons@6 stmt2/0 stmt2/1)) (loop (cdr@8 expr))))))))) #t))))) | |
(if result | |
(quasiquote@328 ((unquote@460 (rename 'if)) | |
(unquote@460 test/0) | |
(unquote@460 (quasiquote@328 | |
((unquote@460 (rename 'begin)) | |
(unquote@460 stmt1/0) | |
(unquote-splicing@463 (map@135 (lambda (stmt2/0) stmt2/0) stmt2/1)) unquote@460 '()))) unquote@460 '())) | |
'(syntax-error "no matching pattern")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment