X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fseq.lisp;h=e602e10c60bb678e20119a3298aee8eac6ef6166;hb=15a5894721592fc295cc61c607c59875ec5825a2;hp=8d09e37790694772c280553ea5b4d1933a7087d0;hpb=0c9dcfb55e73398a3df8b1cc26d601b45685f29f;p=sbcl.git diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 8d09e37..e602e10 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -1269,17 +1269,19 @@ `(let* ((sequence ,(if reverse? '(reverse (the list sequence)) 'sequence)) + (%start ,(if reverse? '(- length end) 'start)) + (%end ,(if reverse? '(- length start) 'end)) (splice (list nil)) (results (do ((index 0 (1+ index)) (before-start splice)) - ((= index (the fixnum start)) before-start) + ((= index (the fixnum %start)) before-start) (declare (fixnum index)) (setq splice (cdr (rplacd splice (list (pop sequence)))))))) - (do ((index start (1+ index)) + (do ((index %start (1+ index)) (this-element) (number-zapped 0)) - ((or (= index (the fixnum end)) (= number-zapped (the fixnum count))) + ((or (= index (the fixnum %end)) (= number-zapped (the fixnum count))) (do ((index index (1+ index))) ((null sequence) ,(if reverse?