]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/sequences.texi
Merge from origin/emacs-25
[gnu-emacs] / doc / lispref / sequences.texi
index f7d26e54d0bd19449e1337f626387811461329c9..08e5e3ae35c6e6ff15909fc4f78cc1712bb9d415 100644 (file)
@@ -763,6 +763,18 @@ according to @var{function}, a function of two arguments that returns
 non-@code{nil} if the first argument should sort before the second.
 @end defun
 
+@defun seq-sort-by function predicate sequence
+  This function is similar to @code{seq-sort}, but the elements of
+@var{sequence} are transformed by applying @var{function} on them
+before being sorted.  @var{function} is a function of one argument.
+
+@example
+(seq-sort-by #'seq-length #'> ["a" "ab" "abc"])
+@result{} ["abc" "ab" "a"]
+@end example
+@end defun
+
+
 @defun seq-contains sequence elt &optional function
   This function returns the first element in @var{sequence} that is equal to
 @var{elt}.  If the optional argument @var{function} is non-@code{nil},