emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master d62766305a: Add `take` and `ntake` (bug#56521)


From: Philip Kaludercic
Subject: Re: master d62766305a: Add `take` and `ntake` (bug#56521)
Date: Mon, 18 Jul 2022 18:56:24 +0000

Sam Steingold <sds@gnu.org> writes:

>> * Mattias Engdegård <znggvnfr@npz.bet> [2022-07-17 11:47:25 -0400]:
>>
>> branch: master
>> commit d62766305ad8fe6ca1695341c34b9836d051e3cb
>> Author: Mattias Engdegård <mattiase@acm.org>
>> Commit: Mattias Engdegård <mattiase@acm.org>
>>
>>     Add `take` and `ntake` (bug#56521)
>>     
>>     These are useful list primitives, complementary to `nthcdr`.
>
> How are these better than the venerable butlast and nbutlast?
> https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Elements.html#index-butlast
> note that butlast and nbutlast have a very long Lisp history, they
> appear also in Common Lisp and many lisps before that.

The immediate advantage I recognise is that you don't need to determine
the length of the list if you are actually just interested in the first
n, not just not-interested in the last m.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]