diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-12-08 20:29:11 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-12-09 20:31:02 +0100 |
commit | 905e9cd876c6b5eb9e0413e6fe67364d3ecad0c3 (patch) | |
tree | c20f96f83a751ec00c810aff9ea4bdeb4a8329bd /lib | |
parent | e22a57f97de2db1535f821f3d5a11174bbf5ecd9 (diff) |
lib.sort: Make doc consistent with sortOn
(cherry picked from commit 50793752a71b35bc0dab203db7d6ad18281e2e1e)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lists.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index 83821ce759187..9397acf148fc0 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -596,8 +596,11 @@ rec { default comparison on a function-derived property, and may be more efficient. Example: - sort (a: b: a < b) [ 5 3 7 ] + sort (p: q: p < q) [ 5 3 7 ] => [ 3 5 7 ] + + Type: + sort :: (a -> a -> Bool) -> [a] -> [a] */ sort = builtins.sort or ( strictLess: list: |