fix sort in lists.nix

This commit is contained in:
Marc Weber 2012-11-20 13:54:38 +01:00
parent f1fba6482a
commit 1a948d97a2
2 changed files with 6 additions and 1 deletions

View File

@ -190,7 +190,7 @@ rec {
else let
part = partition (strictLess (head l)) (tail l);
in
qs part.wrong ([(head l)] ++ qs part.right []);
qs part.wrong ([(head l)] ++ qs part.right concat);
in
qs list [];

View File

@ -104,5 +104,10 @@ runTests {
];
expected = true;
};
testSort = {
expr = sort builtins.lessThan [ 40 2 30 42 ];
expected = [2 30 40 42];
};
}