mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Add 'seq-keep'
* doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).
This commit is contained in:
parent
1d3d87cd67
commit
92df7cd923
4 changed files with 28 additions and 0 deletions
|
|
@ -695,5 +695,9 @@ which may be shorter."
|
|||
result))
|
||||
(nreverse result)))
|
||||
|
||||
(defun seq-keep (function sequence)
|
||||
"Apply FUNCTION to SEQUENCE and return all non-nil results."
|
||||
(delq nil (seq-map function sequence)))
|
||||
|
||||
(provide 'seq)
|
||||
;;; seq.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue