Re-writing abstractions, or Lambda: the ultimate pattern macro:
A practical topic of this message is making programming of pattern-based rewriting systems more intuitive. It is far from trivial to build complex re-writing rules from simpler ones, in head-first pattern-based rewriting systems. The familiar idioms of a 'function call' and a functional composition -- let alone higher-level combinators such as fold -- do not easily apply.
This article proposes a solution: continuation-passing-style (CPS) coupled with a macro-lambda. The solution makes it trivial to compose re-writing rules and to use higher-order rule combinators. We can code re-writing rules using traditional, well-understood applicative programming idioms. The solution relies on a first-class denotation for a future re-writing.
Oh, baby. [via Lambda the Ultimate]