Hello,<div><br></div><div>I am having some issues with the subtleties of the low-level define-macro system. The problem seems to be that the identifiers created by syntax-rules are not equivalent to the identifiers created by define-macro. I would really appreciate some help on this.</div>
<div><br></div><div>Here is a small example:</div><div><br></div><div><div>(define-syntax multi-let</div><div>  (syntax-rules ()</div><div>    ((multi-let (vars ...) body ...)</div><div>     (let* [(vars '()) ...] ;; Declare the variables</div>
<div>       ($set vars) ...    ;; Set them to "initial"</div><div>       body ...))))</div><div><br></div><div>(define-macro ($set var)</div><div>  `(set! ,var "initial"))   ;; Set the variable to "initial"</div>
</div><div><br></div><div><br></div><div>And here is what happens when I try to use it:</div><div>> (multi-let (x y z) x)</div><div>*** ERROR IN #<procedure #2> -- Unbound variable: x</div><div><br></div><div>Thank you very much! For my use case, I am unable to stick completely to using define-syntax thus have to deal with how to intermix these two systems properly.</div>
<div>  -Patrick</div>