From 50793752a71b35bc0dab203db7d6ad18281e2e1e Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 8 Dec 2023 20:29:11 +0100 Subject: [PATCH] lib.sort: Make doc consistent with sortOn --- lib/lists.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lists.nix b/lib/lists.nix index 83821ce75918..9397acf148fc 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: