On Dec 20, 2008, at 11:45 AM, Michael D. Adams wrote:
> Just to be clear, would the following still be legal? > > (let () > (let-syntax ([foo (identifier-syntax 12)]) > (define-syntax x (lambda (stx) #`(+ 3 #,foo)))) > x) > => 15
Yes.
This is the same as:
(let () (let-syntax ([foo (identifier-syntax 12)]) (define-syntax x (lambda (stx) (list #'+ #'3 foo)))) x)
which is the same as:
(let () (define-syntax x (lambda (stx) (list #'+ #'3 #'12))) x)
(let () (+ 3 12))
Aziz,,,
On Dec 20, 2008, at 11:45 AM, Michael D. Adams wrote:
> Just to be clear, would the following still be legal?
>
> (let ()
> (let-syntax ([foo (identifier-syntax 12)])
> (define-syntax x (lambda (stx) #`(+ 3 #,foo))))
> x)
> => 15
Yes.
This is the same as:
(let ()
(let-syntax ([foo (identifier-syntax 12)])
(define-syntax x (lambda (stx) (list #'+ #'3 foo))))
x)
which is the same as:
(let ()
(define-syntax x (lambda (stx) (list #'+ #'3 #'12)))
x)
which is the same as:
(let ()
(+ 3 12))
Aziz,,,