From: David Vázquez Date: Tue, 18 Jun 2013 23:31:17 +0000 (+0200) Subject: Simpler VECTOR definition X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9375ef50cfc7a1804bb1bf3766ee79874e8ae2b6;p=jscl.git Simpler VECTOR definition --- diff --git a/src/array.lisp b/src/array.lisp index db7ad21..20912c2 100644 --- a/src/array.lisp +++ b/src/array.lisp @@ -90,12 +90,7 @@ (and (arrayp x) (null (cdr (array-dimensions x))))) (defun vector (&rest objects) - (let* ((length (length objects)) - (array (make-array length :element-type t)) - (i 0)) - (dolist (element objects array) ;; poor-man's :initial-contents - (aset array i element) - (incf i)))) + (list-to-vector objects)) ;;; FIXME: should take optional min-extension. ;;; FIXME: should use fill-pointer instead of the absolute end of array