I have the following list.
data = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
I want to replace (rotate) each element using a for loop. In the first step, the first element is rotated. In the second step, the first two elements are rotated. Then after 4 steps of the loop, the output should look like:
I tried several options, for example:
ReplacePart[data,
Thread[data[[1 ;; 3]] -> Rotate[data[[1 ;; 3]], 90 Degree]]]
But this replacement doesn't give me the output I want. How can I perform this sequence of rotations?