fix define-get/put-id example (PR 10334); merge to 4.2.1

svn: r15490
This commit is contained in:
Matthew Flatt 2009-07-19 12:14:25 +00:00
parent 43a003f17a
commit bc9f9a385f

View File

@ -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