Shift list elements to left by 3: Difference between revisions

J
(Added Euler)
(J)
Line 1,211:
[7,8,9,1,2,3,4,5,6]
[7,8,9,1,2,3,4,5,6]</pre>
 
=={{header|J}}==
 
<syntaxhighlight lang=J> 3 |. 1 2 3 4 5 6 7 8 9
4 5 6 7 8 9 1 2 3</syntaxhighlight>
 
However, while this matches the task example, it does not match the task title. In most contexts, a shift is different from a rotate:
 
<syntaxhighlight lang=J> 3 |.(!.0) 1 2 3 4 5 6 7 8 9
4 5 6 7 8 9 0 0 0</syntaxhighlight>
 
=={{header|Java}}==
6,951

edits