On Tue, 25 Apr 2006, Logan Capaldo wrote: > > On Apr 23, 2006, at 1:11 PM, Robin Stocker wrote: > >> ara.t.howard / noaa.gov wrote: >>> if you do simply use >>> list = (a .. b).inject([]){|accum, date| accum << date} >> >> I'm curious, is there a special reason for the use of inject here? Doesn't >> the following do the same? >> >> list = (a..b).to_a >> >>> -a >> >> Robin >> > > Yes, they are exactly the same. It's just that inject is a force of nature. > It consumes your Enumerables, and leaves a trail of devastation in its wake. > You can't escape it. You must accept your fate as a slave to inject. well, in this case it was merely the result of posting sans coffee. i do that occasionally and always regret it. ;-) -a -- be kind whenever possible... it is always possible. - h.h. the 14th dali lama