Last list item: Difference between revisions

Content added Content deleted
(Added Quackery.)
m (→‎{{header|Quackery}}: tweaked code)
Line 1,115: Line 1,115:


<syntaxhighlight lang="Quackery"> [ behead
<syntaxhighlight lang="Quackery"> [ behead
-1 swap rot
-1 swap rot witheach
[ 2dup > if
witheach
[ 2dup > iff
[ i^ swap
[ dip
2swap drop ]
[ 2drop i^ ] ]
drop ]
drop 1+ ] is least ( [ --> n )
else drop ]
drop 1+ ] is least ( [ --> n )


' [ 6 81 243 14 25 49 123 69 11 ]
' [ 6 81 243 14 25 49 123 69 11 ]

[ dup echo cr
[ dup echo cr
dup size 1 > while
dup size 1 > while
Line 1,132: Line 1,131:
rot + join
rot + join
again ]
again ]
0 peek echo</syntaxhighlight>
0 peek echo
</syntaxhighlight>


{{out}}
{{out}}