emacs-devel
[Top][All Lists]
Advanced

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

Re: Negative nth index


From: Tassilo Horn
Subject: Re: Negative nth index
Date: Sun, 22 Dec 2024 10:01:59 +0100
User-agent: mu4e 1.12.8; emacs 31.0.50

Eli Zaretskii <eliz@gnu.org> writes:

>> Should negative index for nth be valid? e.g. 
>> (nth -1 '(1 2)) returns 1
>
> What does this do in other Lisps?

In CL, it errors (ditto for nthcdr with negative index).  Same for (nth
'(1 2 3) -1) in Clojure or (list-ref '(1 2 3) -1) in Scheme.

Bye,
Tassilo



reply via email to

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