Created
October 15, 2015 19:06
-
-
Save ktakashi/fa4ee23da88151536619 to your computer and use it in GitHub Desktop.
free-identifier=? on syntax-rules
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
(import (scheme base) | |
(scheme write) | |
(rename (only (scheme base) car) (car r5rs:car))) | |
(define-syntax free-identifier=?? | |
(syntax-rules () | |
((_ a b) | |
(let-syntax ((foo (syntax-rules (a) | |
((_ a) #t) | |
((_ _) #f)))) | |
(foo b))))) | |
(display (free-identifier=?? a a)) (newline) | |
(display (free-identifier=?? b a)) (newline) | |
(display (free-identifier=?? car r5rs:car)) (newline) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment