Jump to content

Shift list elements to left by 3: Difference between revisions

→‎{{header|Euler}}: Sybntax highlight with Mediawiki markup
(→‎{{header|RPL}}: by list reversing)
(→‎{{header|Euler}}: Sybntax highlight with Mediawiki markup)
Line 943:
 
=={{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 &lt;- ls;
L <-'''tail''' lsL &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}}==
3,044

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.