Set syntax

Will the system expand f using the macro g, the procedure g, or will it signal an error?

(define-syntax g
  (syntax-rules ()
    ((g 2) -3)))

(let-syntax ((f (syntax-rules ()
                  ((f 1) (g 2)))))
  (set! g (lambda (x) -1000))
  (f 1))

Back to Scheme Surveys

Page source (GitHub)