projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.1.16:
[sbcl.git]
/
src
/
code
/
list.lisp
diff --git
a/src/code/list.lisp
b/src/code/list.lisp
index
225f1bb
..
5f38f71
100644
(file)
--- 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"
(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)))))
(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)))
(declare (type index size))
(do ((count size (1- count))
(result '() (cons initial-element result)))
- ((zerop count) result)
+ ((<= count 0) result)
(declare (type index count))))
\f
(defun append (&rest lists)
(declare (type index count))))
\f
(defun append (&rest lists)