commit c951734546dda6ad8edf1f6c2fd7360c664b6a67 parent ba1b4cd243c80f0476807a05e029850c2133acc4 Author: Greg Hendershott <greghendershott@gmail.com> Date: Tue, 30 Oct 2012 23:52:43 -0400 Explain define-for-syntax Diffstat:
| M | main.rkt | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/main.rkt b/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[