[plt-scheme] How to create a macro that's in expression position?
Robby has pointed out that what you want isn't *easily* possible, and
Eli has shown that you can achieve what you want if you're willing to
go a little farther. However, there may be an easy compromise
solution. If you are willing to write
(1 . TRIGGER . 4)
then you can get
(a) the benefit of infix
(b) the simplicity of defining the macro as a simple two-place rewrite
rule.
In addition, the users who prefer prefix can still write
(TRIGGER 1 4)
Those who really want to write the infix version will just have to
remember to write the dots.
Something to consider.
Shriram