Merge pull request #190 from MarcWeber/fixes/lists-sort

fix sort in lists.nix
This commit is contained in:
Michael Raskin 2012-11-21 21:34:42 -08:00
commit cae78ef3e3
2 changed files with 6 additions and 1 deletions

View File

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

View File

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