[plt-scheme] Applying DRY in macros

From: Dan Prager (danprager at optusnet.com.au)
Date: Sun Sep 14 06:09:22 EDT 2008

Noel and especially Jens

Thanks for your replies.  I agree that Jens's solution succeeds in 
demonstrating a
'magic' approach using syntax-case, albeit at the cost of increasing 

Noel's point that you cannot 'or' patterns in syntax-rules[case] excludes 
idea for eliminating the repetition.

Another possibility, creating a macro-generating macro to allow for briefer 
'magic' definitions
or to permit the or-ing patterns are certainly beyond me and I imagine that 
neither is an easy task.
I take it that Jens's comment about 'explicit transfer' in his solution 
connotes that 'implicit transfer'
could not be easily achieved.

As to whether the repeated sexp (for list as element body ...) constitutes 
I would say that it is certainly a textual duplicate!

Thanks again



Posted on the users mailing list.