all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: emacs-devel@gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: Re: master d62766305a: Add `take` and `ntake` (bug#56521)
Date: Mon, 18 Jul 2022 18:56:24 +0000	[thread overview]
Message-ID: <87cze21c87.fsf@posteo.net> (raw)
In-Reply-To: <lzilnuuykc.fsf@3c22fb11fdab.ant.amazon.com> (Sam Steingold's message of "Mon, 18 Jul 2022 13:21:07 -0400")

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	other threads:[~2022-07-18 18:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <165807284522.13427.2673143161208860104@vcs2.savannah.gnu.org>
     [not found] ` <20220717154726.F2455C00095@vcs2.savannah.gnu.org>
2022-07-18  8:48   ` master d62766305a: Add `take` and `ntake` (bug#56521) Robert Pluim
2022-07-18 10:59     ` Mattias Engdegård
2022-07-18 11:55       ` Robert Pluim
2022-07-18 16:34         ` Michael Heerdegen
2022-07-18 17:21   ` Sam Steingold
2022-07-18 18:56     ` Philip Kaludercic [this message]
2022-07-18 22:57       ` Sam Steingold
2022-07-19 10:20         ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cze21c87.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.