On Tuesday, May 25, 2004, 8:20:00 PM, Mauricio wrote:

> I'd rather keep Integer#times as it is, and use the 
>   a, b, c = (1..3).map{[]} 
> idiom; I don't think the use case deserves polluting the language (in the
> case of 'of', by being too generic) or a potentially big performance hit,
> for a minimal gain.

I certainly agree that that idiom is clear enough and we don't need to
address the "problem" at hand.  And your notes about performance are
well made.

I guess something like this would qualify for 'extensions' if there
was enough interest and a really good name.  Perhaps n.map { ... } as
a shortcut for (0...n).map { ... } is suitable, but I've realised by
now that my intuition is not often widely shared :)

Gavin