[plt-scheme] How to create a macro that's in expression position?

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Apr 1 06:14:56 EST 2003

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

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.


Posted on the users mailing list.