From: Robert Dober Date: 2007-02-20T06:41:05+09:00 Subject: Re: The peak of the iceberg, was Range cannot loop down and RCR Integer#pred On 2/19/07, SonOfLilit wrote: > -1 First I want to say that I do not mind hijacking threads at all so be me guest ;) But I have not talked about the things you are talking here. > > Though I can understand why it looks like an iceberg, I think it's one > of those programmer icebergs that we invent to complete sets. The iceberg is somewhere else but I do not want to talk about it yet. > > Why? > > #succ is for #each . > > #each is truly essential, as it gives totally new functonality. > > #pred would be for a "different order of each". No sir, your interpretation, I do not advocate a different order of each I am only talking about #pred. It was just when I wanted for demonstration purpose implement a generic reverse_each that I realized that I was missing #pred in a more general way. > Now, yes, I do know > that there /is/ some use for reverse-each, but there are MANY OTHER > different order-eaches that are as important. That's why > #to_a.reverse.each is for those cases, that aren't so abundant as to > /need/ a #reverse_each . > > If a fast reverse_each is needed, it's usually about numbers and then > you have Numeric#step . > > > Perhaps there would be use for this as a library, MAYBE even a > standard library, but I wouldn't throw this in core Ruby. What I am talking about *is* already in the core for Integer and I am drying to apply the same logic to other #succ receivers. I really feel very bad not having given enough thought to the RCR. > > reverse_each isn't more useful than any other case of sorted_each. That could be argued but is completely OT. > > Hmm, maybe we should implement that (no ue really, it's so slow it's > better left out of the path of least resistance.) > > Again you'r making valid and reasonable points, no problem with that, but they are not related to what I wanted to say. Well I feel at least. Robert -- We have not succeeded in answering all of our questions. In fact, in some ways, we are more confused than ever. But we feel we are confused on a higher level and about more important things. -Anonymous