🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99147

nthcdr is slow

#99147
From: David Gillespie
Date: Wed, 07 Nov 1990 22:32
8 lines
947 bytes
The call (nthcdr 100000 '(a b c)) loops 100000 times even though it has
reached the end of the list.  Adding "&& ! NULL (list)" to the loop
condition would fix this.

I don't know if this is the desired behavior, but (nthcdr 0 'wrong-kinda-thing)
returns wrong-kinda-thing rather than signalling an error.

								-- Dave
Technical Details
Message-ID: <9011072232.AA22679@csvax.cs.caltech.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CSVAX.CS.CALTECH.EDU!daveg

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,899b351e9ef653f,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-11-07 14:32:37 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CSVAX.CS.CALTECH.EDU!daveg
From: daveg@CSVAX.CS.CALTECH.EDU (David Gillespie)
Newsgroups: gnu.emacs.bug
Subject: nthcdr is slow
Message-ID: <9011072232.AA22679@csvax.cs.caltech.edu>
Date: 7 Nov 90 22:32:37 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 8
Approved: bug-gnu-emacs@prep.ai.mit.edu
Posted: Wed Nov  7 23:32:37 1990