Sort disjoint sublist: Difference between revisions

Added Quackery.
m (moved PureBASIC to section BASIC)
(Added Quackery.)
Line 3,309:
[7, 6, 5, 4, 3, 2, 1, 0] -> [7, 0, 5, 4, 3, 2, 1, 6]
['h', 'g', 'f', 'e', 'd', 'c', 'b', 'a'] -> ['h', 'a', 'f', 'e', 'd', 'c', 'b', 'g']</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|R}}==
Line 3,319 ⟶ 3,339:
Output:
<pre> 7 0 5 4 3 2 1 6</pre>
 
 
=={{header|Racket}}==
1,467

edits