From: Dave Thomas Date: 2000-10-05T20:58:11+09:00 Subject: [ruby-talk:5306] Re: RFC: Enumerable#every(n) "Akinori MUSHA" writes: > What is 'iteratorMethod { |i| result << i }' supposed to do? This is an old thread. I was looking for a simple way to generate an array containing the results yielded by an iterator without pre-allocating an array. Say 'randGen' generated 'n' random numbers, randGen(100) {|i| puts i | and I wanted the results sorted. It would be nice to be able to do: randGen(100) [] .sort or somesuch to take the iterator results and stick them straight in an array. I'm getting to like the more functional style of expressing things ;-) Dave