From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Negative nth index Date: Sun, 22 Dec 2024 10:01:59 +0100 Message-ID: <87jzbs9jlk.fsf@gnu.org> References: <865xnc6u9n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.8; emacs 31.0.50 Cc: Anand Tamariya , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 22 10:03:13 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tPHrl-0004JC-Mf for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Dec 2024 10:03:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPHqt-0002Qs-HR; Sun, 22 Dec 2024 04:02:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPHqk-0002QB-CR for emacs-devel@gnu.org; Sun, 22 Dec 2024 04:02:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPHqj-0002LL-QV; Sun, 22 Dec 2024 04:02:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=lsVu2f3fdWN/NUnDh4tyorjs+t1tdsJJLklm2P5r3NM=; b=BWykLjlq5wEKNY0rEZw2 Fif48I3Dt1RrbFH6A8rAFxR2TP/CCyTJyXj62yzKrRzc1CyJuasrx6E+WN6lYxoT4JHAjoxo2R9gJ hqATt8hWx7wNVul5P4BiqQK9LrYzPTcDY+UTCar0b6MEgOwtD24ubvGT1AG47n4VtsRZ7qxB8CLLP Vgspj763TWhQVYJ01mk86wtA76DRiqdfEG6ZLnXqYaZWIAxzzVFF/PYi/6AYvIc4Un/9ycIQbLuZl Y+Zjk8vUnbv2vF3OO5ZmOidOOvN0KrhV77IH+43Gq+1LCaIu2gpjGShsqypY5ubdgdEG/i7BQENvp XRjkOu10IRwgHg==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtjedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesthdtredttdertden ucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenuc ggtffrrghtthgvrhhnpeeluddvgeefuddvjeekfeetleegtefgveehhfeuffeuffeghefg ueefgfdvffegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieej feekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilh drfhhmpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pegvmhgrtghsqdguvghvvghlsehgnhhurdhorhhgpdhrtghpthhtoheprghtrghmrghrih ihrgesghhmrghilhdrtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: <865xnc6u9n.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 Dec 2024 09:39:48 +0200") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326844 Archived-At: Eli Zaretskii 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