From: ahoward Date: 2003-01-22T02:57:22+09:00 Subject: Re: Ruby idiom (0...(expr)).map On Wed, 22 Jan 2003, Gavin Sinclair wrote: > > I've found myself writing (0...(expr)).map (as an alternative to > > a = []; expr.times {|i| a << ..}) often enough that I was wondering > > whether to define it as a method of fixnum. Fixnum#map doesn't seem > > quite right, though - any name suggestions? > G> I vaguely remember this idiom. Can you expand on its use? I think it G> may become outdated with 1.8 features. o.k. i smell yet another 'inject' post. are you aware of any docs on the 1.8 release or are you just a whole lot more ambitious than i and checking out the sources? -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================