Say I have an array of size
5. I want to take an index (from 0-4) as input, and iterate through the array, starting at the supplied index.
For example, if the index given was 3, I want to iterate like so:
arr[3]
arr[4]
arr[0]
arr[1]
arr[2]
I can think of plenty of ways to do this - but what's the Ruby way to do it?