[squeak-dev] One liner challenge

Edgar J. De Cleene edgardec2005 at gmail.com
Fri Mar 12 08:52:52 UTC 2010




On 3/12/10 4:51 AM, "Göran Krampe" <goran at krampe.se> wrote:

> 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

This one likes more.
Great Göran





More information about the Squeak-dev mailing list