X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Flist.lisp;h=5f38f7126e26bace475fecfc625c22a0490b9c48;hb=935d6f6a696c2b0bff1c937cef346cb495e41999;hp=225f1bb61dadc74df63bbc54406bab867d74600f;hpb=8e500c66a52b58fd8dab4b098f76e36734d8fdbd;p=sbcl.git diff --git a/src/code/list.lisp b/src/code/list.lisp index 225f1bb..5f38f71 100644 --- a/src/code/list.lisp +++ b/src/code/list.lisp @@ -233,7 +233,8 @@ (defun last1 (list) #!+sb-doc "Return the last cons (not the last element) of a list" - (let ((rest list)) + (let ((rest list) + (list list)) (loop (unless (consp rest) (return list)) (shiftf list rest (cdr rest))))) @@ -275,7 +276,7 @@ (declare (type index size)) (do ((count size (1- count)) (result '() (cons initial-element result))) - ((zerop count) result) + ((<= count 0) result) (declare (type index count)))) (defun append (&rest lists)