From: matz@... (Yukihiro Matsumoto) Date: 2000-11-17T03:37:51+09:00 Subject: [ruby-talk:6402] Re: Array.fill with block? Hi, In message "[ruby-talk:6401] Array.fill with block?" on 00/11/17, Hugh Sasse Staff Elec Eng writes: | |Does anyone else think that it might be a good idea for Array.fill to take |a block to compute the value for each successive element? I'm thinking |that it might be faster/more efficient than Array.collect! because it need |not pass in the value each time. It could pass in the index number, |perhaps. You mean that Array#fill with a block should be faster since it doesn't have to retrieve the element? I don't think so. Retrieving an array element in this case costs only a few machine instructions for each element, I believe. matz.