2

From chicken scheme manual:

define-syntax evaluates the procedure in a distinct expansion environment (initially having access to the exported identifiers of the scheme module)

Is it possible to inject the user-function to the expansion environment?

(define-syntax my-macro
  (er-macro-transformer
   (lambda (exp rename compare)
     (user-function exp)))
Feng
  • 2,872
  • 3
  • 23
  • 20

1 Answers1

4

Yes. Use begin-for-syntax or require-extension-for-syntax (the last one also known as use-for-syntax.

soegaard
  • 30,661
  • 4
  • 57
  • 106