If not, then the canonical name for the function? "Cycle" makes sense to me, but that's taken.
The example in the title is written for clarity and conciseness. In real cases, with which I work, there are many repetitions. (for example, I want [1, 1, 0, 0, 0, 0, 2, 1] to match [0, 0, 2, 1, 1, 1, 0])
This type of thing hides my algorithm and fills my code with otherwise useless repetition.
source share