Nikolai Weibull <mailing-lists.ruby-talk / rawuncut.elitemail.org> wrote:
> How about adding a fifth way of constructing new arrays?:
>
> Array.new{|array| block }
>
> Here, array is the newly created array, and the block will initialize
> it as it sees fit, e.g,
>
> ary = Array.new{ |ary| 5.times{ |i| ary << i } },
>
> which is a stupid way of doing it (Array.new(5){ |i| i } would do),
> but it shows the idea.  I often find myself writing methods that fit
> the following template:
>
> def a
>  ary = []
> .. construct ary by adding elements to it ...
>  ary
> end

But *what* are the initializations you cannot do nicely ATM?  Note, that 
there are also forms that make use of map and inject that can be quite 
concise...

Kind regards

    robert