From bc9f9a385f7060b0412d314e579fca5eaaab8700 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 19 Jul 2009 12:14:25 +0000 Subject: [PATCH] fix define-get/put-id example (PR 10334); merge to 4.2.1 svn: r15490 --- collects/scribblings/guide/pattern-macros.scrbl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/guide/pattern-macros.scrbl b/collects/scribblings/guide/pattern-macros.scrbl index b4d885c1bd..908f8b60be 100644 --- a/collects/scribblings/guide/pattern-macros.scrbl +++ b/collects/scribblings/guide/pattern-macros.scrbl @@ -304,11 +304,11 @@ Naturally, we can implement @scheme[define-get/put-id] as a macro: @schemeblock[ (define-syntax-rule (define-get/put-id id get put!) - (define-syntax clock + (define-syntax id (syntax-id-rules (set!) - [(set! clock e) (put-clock! e)] - [(clock a (... ...)) ((get-clock) a (... ...))] - [clock (get-clock)]))) + [(set! id e) (put! e)] + [(id a (... ...)) ((get) a (... ...))] + [id (get)]))) ] The @scheme[define-get/put-id] macro is a @deftech{macro-generating