Re: [racket] let-syntax referencing inner binding

2011-07-11 Thread Jon Rafkind
After a few minutes thought I guess this would be 3d-syntax. References to top-level identifiers have no state associated with them whereas inner bindings amount to closures. On 07/11/2011 06:40 PM, Jon Rafkind wrote: > The code mostly speaks for itself but I'm wondering why the reference to > `te

[racket] let-syntax referencing inner binding

2011-07-11 Thread Jon Rafkind
The code mostly speaks for itself but I'm wondering why the reference to `test2' is a compilation error. #lang racket (define-for-syntax (test) (printf "hello from test\n") #'1) (define-for-syntax (do-it stx) (define (test2) (printf "hello from test2\n") #'2) ;; ok, prints "hell