fix sort in lists.nix
This commit is contained in:
parent
f1fba6482a
commit
1a948d97a2
@ -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 [];
|
||||||
|
|
||||||
|
@ -104,5 +104,10 @@ runTests {
|
|||||||
];
|
];
|
||||||
expected = true;
|
expected = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
testSort = {
|
||||||
|
expr = sort builtins.lessThan [ 40 2 30 42 ];
|
||||||
|
expected = [2 30 40 42];
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user