[N]BUTLAST perform a single pass over the list
authorPaul Khuong <pvk@pvk.ca>
Mon, 4 Nov 2013 18:55:10 +0000 (13:55 -0500)
committerPaul Khuong <pvk@pvk.ca>
Mon, 4 Nov 2013 18:58:10 +0000 (13:58 -0500)
commit498ec57f1f860fb09c998b7a413dbeaf9c0304e8
tree46704ceba05c14b0996ccfe032158f4508b45496
parent8be78b41ac1695e1c9b5d7f6c8bd41e3c7e6e6fc
[N]BUTLAST perform a single pass over the list

The old code would first count the number of conses, and then
SUBSEQ/(RPLACD/NTHCDR).  Instead traverse the list with two offset
pointers that advance in lockstep.

Based on a patch by Johan Andersson, on lp#1245697.
NEWS
src/code/list.lisp