Shift list elements to left by 3: Difference between revisions

Content added Content deleted
(→‎{{header|RPL}}: by list reversing)
(→‎{{header|Euler}}: Sybntax highlight with Mediawiki markup)
Line 943: Line 943:


=={{header|Euler}}==
=={{header|Euler}}==
'''begin'''
<syntaxhighlight lang="euler">
'''new''' shl; '''new''' shl3;
begin
new shl; new shl3;
shl &lt;- ` '''formal''' ls;

'''if''' '''length''' ls &lt; 2 '''then''' ls
shl <- ` formal ls;
if length ls < 2 then ls
'''else''' '''begin'''
else begin
'''new''' L;
new L;
L &lt;- ls;
L <- ls;
'''tail''' L &amp; ( L[ 1 ] )
tail L & ( L[ 1 ] )
'''end'''
end
&apos;;
shl3 &lt;- ` '''formal''' ls; shl( shl( shl( ls ) ) ) &apos;;
';
shl3 <- ` formal ls; shl( shl( shl( ls ) ) ) ';
'''out''' shl3( ( 1, 2, 3, 4, 5, 6, 7, 8 ) )

'''end'''
out shl3( ( 1, 2, 3, 4, 5, 6, 7, 8 ) )
$
end
$
</syntaxhighlight>


=={{header|Excel}}==
=={{header|Excel}}==