From: ara.t.howard@... Date: 2006-08-31T11:51:08+09:00 Subject: Re: [RCR] Array.step On Thu, 31 Aug 2006, Logan Capaldo wrote: > > On Aug 30, 2006, at 10:22 PM, nobu@ruby-lang.org wrote: > >> Hi, >> >> At Thu, 31 Aug 2006 03:02:14 +0900, >> Logan Capaldo wrote in [ruby-talk:211561]: >>> I'd almost rather make the RCR for changing step rather than adding >>> Array.step. It's more general, and with 1.9 magic iterators I think >>> it would obviate the need to even have Array.step, e.g.: 1.step >>> (3).to_a. Make n.step { ... } work as well and make it walk backwards >>> if its from high to low. >> >> Do you mean this? >> >> $ ruby -v -e 'p 1.step(5,2).to_a' >> ruby 1.9.0 (2006-08-29) [i686-linux] >> [1, 3, 5] >> > Pretty much, except possibly supporting Ara's additional requirements of > 9.step.to_a and 1.step(-2).to_a #=> [1, 0, -1, -2] indeed and agreed. -a -- what science finds to be nonexistent, we must accept as nonexistent; but what science merely does not find is a completely different matter... it is quite clear that there are many, many mysterious things. - h.h. the 14th dalai lama