Remove unused variables from CONCATENATE

This commit is contained in:
jjgarcia 2008-05-29 06:46:38 +00:00
parent 83d3be00ea
commit be239d8bf7
2 changed files with 16 additions and 19 deletions

View file

@ -84,10 +84,9 @@ contiguous block."
"Args: (&rest objects)
Creates and returns a simple-vector, with the N-th OBJECT being the N-th
element."
(make-array (list (length objects))
:element-type t
:initial-contents objects))
(let ((a (si:make-vector t (length objects) nil nil nil 0)))
(fill-array a objects)
a))
(defun array-dimensions (array)
"Args: (array)

View file

@ -139,10 +139,10 @@ default value of INITIAL-ELEMENT depends on TYPE."
(setf start 0))
((not (integerp start))
(error "Value ~A is not a valid index into sequence ~A" start sequence)))
(cond ((>= start (length sequence))
nil)
((consp sequence)
(cond ((consp sequence)
(nthcdr start sequence))
((>= start (length sequence))
nil)
(t
start)))
@ -166,18 +166,16 @@ default value of INITIAL-ELEMENT depends on TYPE."
"Args: (type &rest sequences)
Returns a new sequence of the specified type, consisting of all elements of
SEQUENCEs."
(do* ((x (make-sequence result-type
(apply #'+ (mapcar #'length sequences))))
(s sequences (cdr s))
(ix (make-seq-iterator x)))
((null s) x)
(declare (fixnum i))
(do ((js (make-seq-iterator (car s)) (seq-iterator-next (car s) js))
(n (length (car s))))
((null js))
(declare (fixnum j n))
(seq-iterator-set x ix (seq-iterator-ref (car s) js))
(setq ix (seq-iterator-next x ix)))))
(do* ((length-list (mapcar #'length sequences) (rest length-list))
(output (make-sequence result-type (apply #'+ length-list)))
(sequences sequences (rest sequences))
(i (make-seq-iterator output)))
((null sequences) output)
(do* ((s (first sequences))
(j (make-seq-iterator s) (seq-iterator-next s j)))
((null j))
(seq-iterator-set output i (seq-iterator-ref s j))
(setq i (seq-iterator-next output i)))))
(defun map (result-type function sequence &rest more-sequences)