Explain define-for-syntax
This commit is contained in:
parent
ba1b4cd243
commit
c951734546
11
main.rkt
11
main.rkt
|
@ -534,6 +534,17 @@ definition of the helper function(s) inside @racket[begin-for-syntax]:
|
|||
....)
|
||||
]
|
||||
|
||||
In the simple case, we can also use @racket[define-for-syntax], which
|
||||
composes @racket[begin-for-syntax] and @racket[define]:
|
||||
|
||||
@racketblock[
|
||||
(define-for-syntax (my-helper-function ....)
|
||||
....)
|
||||
(define-syntax (macro-using-my-helper-function stx)
|
||||
(my-helper-function ....)
|
||||
....)
|
||||
]
|
||||
|
||||
To review:
|
||||
|
||||
@itemize[
|
||||
|
|
Loading…
Reference in New Issue
Block a user