fix doc bug

Closes PR 11690
 Merge to 5.1
(cherry picked from commit ab588eb69a)
This commit is contained in:
Matthew Flatt 2011-02-03 13:16:39 -07:00 committed by Eli Barzilay
parent bfae2d4573
commit c10d0a6f88

View File

@ -3,6 +3,8 @@
scribble/eval
"guide-utils.ss")
@(define swap-eval (make-base-eval))
@title[#:tag "pattern-macros"]{Pattern-Based Macros}
A @deftech{pattern-based macro} replaces any code that matches a
@ -247,9 +249,9 @@ Given our macro definitions, the @racket[swap] or @racket[rotate]
identifiers must be used after an open parenthesis, otherwise a syntax
error is reported:
@interaction-eval[(define-syntax swap (syntax-rules ()))]
@interaction-eval[#:eval swap-eval (define-syntax swap (syntax-rules ()))]
@interaction[(+ swap 3)]
@interaction[#:eval swap-eval (+ swap 3)]
An @deftech{identifier macro} works in any expression. For example, we
can define @racket[clock] as an identifier macro that expands to
@ -481,3 +483,6 @@ Racket with just three small pattern-based macros:
@racket[define-cbr], @racket[define-for-cbr], and
@racket[define-get/put-id].
@; -----------------------------------------------------------------
@close-eval[swap-eval]