diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-07-13 13:46:52 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-07-17 17:35:49 +0200 |
commit | d62766305ad8fe6ca1695341c34b9836d051e3cb (patch) | |
tree | 3bb041d82a695bc4746d7c8f0fe79939ec80d0bc /lisp/emacs-lisp/avl-tree.el | |
parent | 637436970f34f860d50f73a514b3bafd0c5cace7 (diff) | |
download | emacs-d62766305ad8fe6ca1695341c34b9836d051e3cb.tar.gz emacs-d62766305ad8fe6ca1695341c34b9836d051e3cb.tar.bz2 emacs-d62766305ad8fe6ca1695341c34b9836d051e3cb.zip |
Add `take` and `ntake` (bug#56521)
These are useful list primitives, complementary to `nthcdr`.
* src/fns.c (Ftake, Fntake): New.
(syms_of_fns): Defsubr them.
* doc/lispref/lists.texi (List Elements):
* lisp/emacs-lisp/shortdoc.el (list): Document.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Declare `take` pure and side-effect-free.
* test/src/fns-tests.el (fns-tests--take-ref, fns--take-ntake):
New test.
* etc/NEWS: Announce.
Diffstat (limited to 'lisp/emacs-lisp/avl-tree.el')
0 files changed, 0 insertions, 0 deletions