fix define-get/put-id example (PR 10334); merge to 4.2.1
svn: r15490
This commit is contained in:
parent
43a003f17a
commit
bc9f9a385f
|
@ -304,11 +304,11 @@ Naturally, we can implement @scheme[define-get/put-id] as a macro:
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(define-syntax-rule (define-get/put-id id get put!)
|
(define-syntax-rule (define-get/put-id id get put!)
|
||||||
(define-syntax clock
|
(define-syntax id
|
||||||
(syntax-id-rules (set!)
|
(syntax-id-rules (set!)
|
||||||
[(set! clock e) (put-clock! e)]
|
[(set! id e) (put! e)]
|
||||||
[(clock a (... ...)) ((get-clock) a (... ...))]
|
[(id a (... ...)) ((get) a (... ...))]
|
||||||
[clock (get-clock)])))
|
[id (get)])))
|
||||||
]
|
]
|
||||||
|
|
||||||
The @scheme[define-get/put-id] macro is a @deftech{macro-generating
|
The @scheme[define-get/put-id] macro is a @deftech{macro-generating
|
||||||
|
|
Loading…
Reference in New Issue
Block a user