[squeak-dev] One liner challenge

Göran Krampe goran at krampe.se
Fri Mar 12 06:51:56 UTC 2010


I know this is "cheating" but if we use my SimpleMacro package:


...then it is trivially written as:

(MacroProcessor block: [:x |  '(', x asUppercase, ')' ]
   between: '(' and: ')') deep: false; process:
     'This is a (string) with some (parenthetical fields)'


Note the "deep: false;", otherwise it will try to expand the expansions 
and goes into an infinite loop.

regards, Göran

More information about the Squeak-dev mailing list