2018-02-15 10:14:56 -05:00
|
|
|
USING: kernel sequences sorting.heap tools.test ;
|
2014-06-10 20:32:02 -04:00
|
|
|
|
|
|
|
{ { } } [ { } heapsort ] unit-test
|
|
|
|
{ { 1 } } [ { 1 } heapsort ] unit-test
|
|
|
|
{ { 1 2 3 4 5 } } [ { 1 4 2 5 3 } heapsort ] unit-test
|
|
|
|
|
|
|
|
{
|
|
|
|
{ "fred" "dino" "wilma" "betty" "barney" "pebbles" "bamm-bamm" }
|
|
|
|
} [
|
|
|
|
{ "fred" "wilma" "pebbles" "dino" "barney" "betty" "bamm-bamm" }
|
|
|
|
[ length ] heapsort-with
|
|
|
|
] unit-test
|