Adding test file

This commit is contained in:
Justin Ethier 2017-11-17 16:48:19 +00:00
parent 408ef442c8
commit 3446d46a6f

15
tests/let-syntax.scm Normal file
View file

@ -0,0 +1,15 @@
(import (scheme base))
;; (let-syntax ((given-that (syntax-rules ()
;; ((given-that test stmt1 stmt2 ...)
;; (if test
;; (begin stmt1
;; stmt2 ...))))))
;; (let ((if #t))
;; (given-that if (set! if 'now))
;; if)) ;; => now
(let ((x 'outer))
(let-syntax ((m (syntax-rules () ((m) x))))
(let ((x 'inner))
(m)))) ;; Should be outer