On Monday, 3 October 2022 at 18:09:05 UTC, Fausto wrote:
Hello all,

I am trying to rotate left an array.
I found a very basic way, and I am not sure if there is something clever than this :) maybe using slices... the external for represents how many times you are rotating (in this case 2).

If you don't need to add or remove the data from your array then I'd go with constant array and translating external index to an internal one for this array. So it's gonna be something like a "rotated view".

Reply via email to