From: Logan Capaldo Date: 2006-08-31T06:59:13+09:00 Subject: Re: [RCR] Array.step On Aug 30, 2006, at 5:45 PM, ara.t.howard@noaa.gov wrote: > On Thu, 31 Aug 2006, Logan Capaldo wrote: > >> >> On Aug 30, 2006, at 1:52 PM, ara.t.howard@noaa.gov wrote: >> >>> Array.step(0,-4) >>> ==>[] # <- this one's wrong >> >> 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. > > indeed. just to be clear, however, the RCR is for Array.step not > the exact > impl. the reason i wrote the one i did is because it can be > translated to C > easily. > Well I don't really care persay about the implementation (I was just having fun with the golf), just the semantics. I still think this RCR would be better served as an addition of these capabilities to Numeric#step, and then if desired also an Array.step. That's just my opinion though. > regards. > > -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 >