I want to look at every n-th elements in an array. In C++, I\'d do this:
for(int x = 0; x
class Array def step(interval, &block) ((interval -1)...self.length).step(interval) do |value| block.call(self[value]) end end end
You could add the method to the class Array