Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv7737
Modified Files: sequences.lisp Log Message: Somewhat improved concatenate, for (eq result-type 'vector).
Date: Thu Jun 10 06:51:24 2004 Author: ffjeld
Index: movitz/losp/muerte/sequences.lisp diff -u movitz/losp/muerte/sequences.lisp:1.9 movitz/losp/muerte/sequences.lisp:1.10 --- movitz/losp/muerte/sequences.lisp:1.9 Thu Jun 10 05:21:11 2004 +++ movitz/losp/muerte/sequences.lisp Thu Jun 10 06:51:24 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Sep 11 14:19:23 2001 ;;;; -;;;; $Id: sequences.lisp,v 1.9 2004/06/10 12:21:11 ffjeld Exp $ +;;;; $Id: sequences.lisp,v 1.10 2004/06/10 13:51:24 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -1600,6 +1600,15 @@ (copy-seq (first sequences))) ((= 0 (length (first sequences))) (apply #'concatenate result-type (cdr sequences))) + ((eq result-type 'vector) + (let* ((r (make-array (let ((length 0)) + (dolist (s sequences length) + (incf length (length s)))))) + (i 0)) + (dolist (s sequences) + (replace r s :start1 i) + (incf i (length s))) + r)) (t (error "Can't concatenate ~S yet: ~:S" result-type sequences))))