Merge pull request #190 from MarcWeber/fixes/lists-sort
fix sort in lists.nix
This commit is contained in:
commit
cae78ef3e3
@ -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 [];
|
||||
|
||||
|
@ -104,5 +104,10 @@ runTests {
|
||||
];
|
||||
expected = true;
|
||||
};
|
||||
|
||||
testSort = {
|
||||
expr = sort builtins.lessThan [ 40 2 30 42 ];
|
||||
expected = [2 30 40 42];
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user