R
Robert Dober
Hi all
I was just following the thread about "loop cannot count down" and
was about to propose a monkey patched method which might have been
convenient for the poster.
Like e.g. Range#each_down (bad name I know).
The point is, I cannot, because Range#each is based on succ, and
Range#each_down would be based on pred.
I just wonder if it might not be a good idea to define pred for all
core classes for which succ is defined. I kind of feel stupid not
having suggested that in the first place, now
.
(http://rcrchive.net/rcrs/6)
Opinions?
Cheers
Robert
I was just following the thread about "loop cannot count down" and
was about to propose a monkey patched method which might have been
convenient for the poster.
Like e.g. Range#each_down (bad name I know).
The point is, I cannot, because Range#each is based on succ, and
Range#each_down would be based on pred.
I just wonder if it might not be a good idea to define pred for all
core classes for which succ is defined. I kind of feel stupid not
having suggested that in the first place, now
(http://rcrchive.net/rcrs/6)
Opinions?
Cheers
Robert