[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [racket-dev] Enhancement to the syntax system?

From: Eli Barzilay
Subject: Re: [racket-dev] Enhancement to the syntax system?
Date: Tue, 10 Jul 2012 10:51:57 -0400

20 minutes ago, Marijn wrote:
> It seems to me that both these results cannot be correct
> simultaneously, but I'll await the experts' opinion on that.

This does look weird:

  #lang racket
  (define-for-syntax (f stx) #`(let ([x 1]) #,stx))
  (define-syntax (m stx)
    (with-syntax ([zz (f #'x)]) #`(let ([x 2]) zz)))

evaluates to 1, but if I change the first two "stx" names into "x"
*or* if I change the argument name for the macro to "x", then it
returns 2.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                             Maze is Life!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]