Dutch national flag problem: Difference between revisions
Content added Content deleted
(Added Quackery.) |
(→{{header|Quackery}}: tweakage) |
||
Line 3,379: | Line 3,379: | ||
[ 3 ] is blue ( --> n ) |
[ 3 ] is blue ( --> n ) |
||
[ true swap |
[ true swap |
||
behead do swap |
behead do swap |
||
witheach |
witheach |
||
[ do tuck > if |
[ do tuck > if |
||
[ dip not |
[ dip not |
||
conclude ] ] |
conclude ] ] |
||
drop ] is sorted ( [ --> b ) |
drop ] is sorted ( [ --> b ) |
||
[] ' [ red white blue ] |
|||
witheach |
|||
[ swap |
|||
⚫ | |||
⚫ | |||
nip ] |
|||
⚫ | |||
⚫ | |||
4 random 1+ times [ ' white nested join ] |
|||
⚫ | |||
⚫ | |||
say "Before sorting: " dup echo cr |
say "Before sorting: " dup echo cr |
||
say " After sorting: " sortwith [ dip do do > ] echo cr</syntaxhighlight> |
say " After sorting: " sortwith [ dip do do > ] echo cr</syntaxhighlight> |