Hi –
how about this?
Object#collect
them = collect(3){ Array.new }
I don’t think “collect” is suitable as all-purpose/top-level method.
It really means: collect results from filtering an enumerable object’s
elements. You could say the object here is 3, but that’s got an
awfully procedural and kind of backwards feel to it (assigning the
role of the receiver to an argument).
should’nt this be Kernel::collect?
Anyway, I’d prefer to see Object#*
them = Array.new * 3 # actually dup/clone
I think * is already claimed by too many existing classes to be
reclaimed for this (for example, “abc” * 3, or 10 * 3).
David
···
On Mon, 31 May 2004, gabriele renzi wrote:
il Tue, 25 May 2004 15:37:04 -0600, “Ara.T.Howard” ahoward@noaa.gov > ha scritto::
–
David A. Black
dblack@wobblini.net