projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #117 from Ferada/small-fixes
[jscl.git]
/
src
/
sequence.lisp
diff --git
a/src/sequence.lisp
b/src/sequence.lisp
index
6ac3ebf
..
85d5276
100644
(file)
--- a/
src/sequence.lisp
+++ b/
src/sequence.lisp
@@
-143,8
+143,15
@@
(rplacd pointer ())
drop-a))))
(copy-list (nthcdr a seq))))
(rplacd pointer ())
drop-a))))
(copy-list (nthcdr a seq))))
- ((arrayp seq)
- (if b
- (slice seq a b)
- (slice seq a)))
+ ((vectorp seq)
+ (let* ((b (or b (length seq)))
+ (size (- b a))
+ (new (make-array size :element-type (array-element-type seq))))
+ (do ((i 0 (1+ i))
+ (j a (1+ j)))
+ ((= j b) new)
+ (aset new i (aref seq j)))))
(t (not-seq-error seq))))
(t (not-seq-error seq))))
+
+
+