0

Is possible to write anaphoric macros (e.g. aif) using syntax-rules only? Such a macro would need to break the hygiene of the macro system. I know that this is possible with syntax-case, but is it somehow possible with syntax-rules in R5RS and R7RS-small? If so, could you supply a minimal example that implements "anaphoric if" (aif) using syntax-rules only?

Flux
  • 9,805
  • 5
  • 46
  • 92
  • [Kiselyov 2013 How to Write Seemingly Unhygienic and Referentially Opaque Macros with Syntax-rules](http://okmij.org/ftp/Scheme/Dirty-Macros.pdf) – mnemenaut Oct 05 '22 at 10:28
  • syntax-rules + [SRFI-139 syntax parameters](https://srfi.schemers.org/srfi-139/srfi-139.html) can do it. – Shawn Oct 09 '22 at 07:37

0 Answers0