[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Negative nth index
From: |
Stefan Kangas |
Subject: |
Re: Negative nth index |
Date: |
Mon, 23 Dec 2024 05:40:36 +0000 |
Tassilo Horn <tsdh@gnu.org> writes:
> 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.
Stefan Monnier, any comments here?
- Negative nth index, Anand Tamariya, 2024/12/22
- Re: Negative nth index, Eli Zaretskii, 2024/12/22
- Re: Negative nth index, Tassilo Horn, 2024/12/22
- Re: Negative nth index, Teemu Likonen, 2024/12/24
- Re: Negative nth index, Stefan Monnier, 2024/12/24
- Re: Negative nth index, Sebastián Monía, 2024/12/24
- Re: Negative nth index, Pip Cet, 2024/12/24
- Re: Negative nth index, Mattias Engdegård, 2024/12/25
- Re: Negative nth index, Pip Cet, 2024/12/25
- Re: Negative nth index, Mattias Engdegård, 2024/12/25