[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/sort-key a12e41ab540 7/7: sort: add NEWS entry
From: |
Mattias Engdegård |
Subject: |
scratch/sort-key a12e41ab540 7/7: sort: add NEWS entry |
Date: |
Wed, 20 Mar 2024 14:55:01 -0400 (EDT) |
branch: scratch/sort-key
commit a12e41ab54017cd572881412f92fc3971b3a7cdb
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
sort: add NEWS entry
---
etc/NEWS | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index ccae29f6799..a7dda43f169 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1710,6 +1710,24 @@ bool-vectors, markers, buffers and processes.
It is intended as a convenient ordering predicate for sorting, and is
likely to be faster than hand-written Lisp functions.
+** 'sort' function arguments and features.
+The 'sort' function can now be called using the signature
+
+ (sort SEQ &rest KEYWORD-ARGUMENTS)
+
+where the arguments after the first are keyword/value pairs, all optional:
+':key' specifies a function that produces the sorting key from an element,
+':lessp' specifies the ordering predicate, defaulting to 'value-less-p',
+':reverse' is used to reverse the sorting order,
+':destructive' is used for in-place sorting, as the default is now to
+sort a copy of the input.
+
+The new signature is less error-prone and reduces the need to write
+ordering predicates by hand.
+
+The old signature, '(sort SEQ PREDICATE)', can still be used and sorts
+its input in-place as before.
+
** New function 'sort-on'.
This function implements the Schwartzian transform, and is appropriate
for sorting lists when the computation of the sort key of a list
- branch scratch/sort-key created (now a12e41ab540), Mattias Engdegård, 2024/03/20
- scratch/sort-key c0dd5d38c74 2/7: sort: new keyword argument calling convention, Mattias Engdegård, 2024/03/20
- scratch/sort-key 8d60d8bbcfb 1/7: sort: add back timsort key function handling, Mattias Engdegård, 2024/03/20
- scratch/sort-key 0ef023eabf4 4/7: sort: make :lessp default to `value-less-p`, Mattias Engdegård, 2024/03/20
- scratch/sort-key 2b1d4c33fd1 5/7: sort: add test for the keyword args, Mattias Engdegård, 2024/03/20
- scratch/sort-key 6d448cce870 6/7: value-less-p: add NEWS entry, Mattias Engdegård, 2024/03/20
- scratch/sort-key b0a32c899b4 3/7: Add value-less-p, Mattias Engdegård, 2024/03/20
- scratch/sort-key a12e41ab540 7/7: sort: add NEWS entry,
Mattias Engdegård <=