From: Andreas Schwab <schwab@linux-m68k.org>
To: Wilfred Hughes <wilfred@editd.com>
Cc: 15059@debbugs.gnu.org
Subject: bug#15059: 24.3; nth with negative index values
Date: Fri, 09 Aug 2013 17:51:50 +0200 [thread overview]
Message-ID: <87siyi3lrd.fsf@igel.home> (raw)
In-Reply-To: <CAD0QT4LGFPx5rvNyAX3vO6za_cX79hnU5u+eP6h+Bsb8u+8wRQ@mail.gmail.com> (Wilfred Hughes's message of "Fri, 9 Aug 2013 12:55:53 +0100")
Wilfred Hughes <wilfred@editd.com> writes:
> I've noticed that nth returns the first item in a list, when it's given
> a negative index.
>
> (nth -1 '(5 6 7)) ;; 5
> (nth -2 '(5 6 7)) ;; 5
>
> Judging by my reading of the docstring, I was expecting nil
The list is longer than -1, so this case doesn't apply.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2013-08-09 15:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 11:55 bug#15059: 24.3; nth with negative index values Wilfred Hughes
2013-08-09 15:51 ` Andreas Schwab [this message]
2013-08-09 18:52 ` Glenn Morris
2013-08-09 21:58 ` Stefan Monnier
2013-08-10 1:31 ` Glenn Morris
2013-08-12 10:10 ` Wilfred Hughes
2013-08-12 14:09 ` Stefan Monnier
2013-08-13 7:15 ` Glenn Morris
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87siyi3lrd.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=15059@debbugs.gnu.org \
--cc=wilfred@editd.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).