GNU bug report logs - #56521
Add 'take' list operation [PATCH]

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Tue, 12 Jul 2022 17:07:02 UTC

Severity: wishlist

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56521 <at> debbugs.gnu.org
Subject: bug#56521: Add 'take' list operation [PATCH]
Date: Sun, 17 Jul 2022 18:00:17 +0200
Not much argument here; pushed to master. A couple of notes:

I went for the C implementation of `ntake` because I already had the code, and because an elisp implementation would be slower than `take` for short lists or small N, and there very point of `ntake` is speed.

`nthcdr` has some elaborate code for handling bignum arguments which makes some kind of sense since it's defined as an iteration of `cdr`. Currently, `take` and `ntake` require fixnums because bignums didn't seem to be worth the trouble.

Before closing the bug, I'll make the new code pay their way by adding some calls. `seq-take` is first in line for a makeover.





This bug report was last modified 2 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.