Sort disjoint sublist: Difference between revisions
Added Quackery.
(Added Quackery.) |
(Added Quackery.) |
||
Line 3,340:
<pre> 7 0 5 4 3 2 1 6</pre>
=={{header|Quackery}}==
<syntaxhighlight lang="Quackery">
[ sort tuck [] unrot
witheach
[ dip dup peek
rot join swap ]
swap sort
dip swap witheach
[ over i^ peek
dip rot poke
swap ]
drop ] is sortdisjointsublist ( [ [ --> [ )
' [ 7 6 5 4 3 2 1 0 ] ' [ 6 1 7 ] sortdisjointsublist echo</syntaxhighlight>
{{out}}
<pre>[ 7 0 5 4 3 2 1 6 ]</pre>
=={{header|Racket}}==
|