From: Abdulaziz Ghuloum Date: Wed, 23 May 2007 00:40:12 -0400 Subject: [Formal] Minor improvement to lisp-transformer submitter: Abdulaziz Ghuloum type: better example priority: minor component: syntax-case version: 5.93-libs (page 54) summary: The lisp-transformer macro can be improved slightly The lisp-transformer example in page 54 does not yield true lisp transformers (as its description says). (define lisp-transformer (lambda (p) (lambda (x) (datum->syntax #'lisp-transformer (p (syntax->datum x)))))) Rewriting the example as: (define lisp-transformer (lambda (p) (lambda (x) (syntax-case x () [(id . rest) (identifier? #'id) (datum->syntax #'id (p (syntax->datum x)))])))) will re-introduce the datum in the context where the actual transformer was used instead of where the lisp-transformer macro was defined. defmacro is left as an exercise. RESPONSE: The suggested change has been adopted.