[plt-scheme] syntax-local-context?
The following confuses me:
(define-syntax (show-local-context stx)
(syntax-case stx ()
((show-local-context x)
(let ((x (syntax x)))
(printf "~s ~s.~n" (syntax-object->datum x) (syntax-local-context))
x))))
(let ((d (show-local-context (add1 2)))) d) ; --> 3
; displayed: (add1 2) top-level.
I expected display: (add1 2) expression. Do I misunderstand the manual or
(less probably) is this a bug?
(((((lambda(x)((((((((x x)x)x)x)x)x)x)x))
(lambda(x)(lambda(y)(x(x y)))))
(lambda(x)(x)x))
(lambda()(printf "Greetings, Jos~n"))))