Im trying to cycle through a list of any length at a predetermined rate.
Lets say i have the list:
List [a, b, c, d, e] and I want to cycle through it and always pick the next three items, and of course if i reach the end of the list, I’d want it to go back and start picking from the beginning.
Here is an example output:
- Cycle 1 = a, b, c
- Cycle 2 = d, e, a
- Cycle 3 = b, c, d
- Cycle 4 = e, a, b
And so on and so forth. Any idea how to go about that?