I want to look at every n-th elements in an array. In C++, I\'d do this:
for(int x = 0; x
What about:
> [1, 2, 3, 4, 5, 6, 7].select.each_with_index { |_,i| i % 2 == 0 } => [1, 3, 5, 7]
Chaining of iterators is very useful.