projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c080953
)
Simpler VECTOR definition
author
David Vázquez
<davazp@gmail.com>
Tue, 18 Jun 2013 23:31:17 +0000
(
01:31
+0200)
committer
David Vázquez
<davazp@gmail.com>
Tue, 18 Jun 2013 23:31:17 +0000
(
01:31
+0200)
src/array.lisp
patch
|
blob
|
history
diff --git
a/src/array.lisp
b/src/array.lisp
index
db7ad21
..
20912c2
100644
(file)
--- 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