[squeak-dev] One liner challenge

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


Hi!

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

http://map.squeak.org/packagebyname/simplemacro

...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