Design
macro.txt
Associated article: Building Little Languages with Macros
Tags: Design
Published source code accompanying the article John Clements, Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi, in which they use pattern-based macros in Scheme to can express interesting language extensions.
Building Little Languages with Macros
by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi
Example 1:
(a)
#define swap(x,y) {int tmp=y; y=x; x=tmp;}
(b)
swap(c.red, d->blue)
(c)
{ int tmp=d-&...


