1 (in-package :alexandria
)
3 (defun copy-array (array &key
4 (element-type (array-element-type array
))
5 (fill-pointer (and (array-has-fill-pointer-p array
)
7 (adjustable (adjustable-array-p array
)))
8 "Returns an undisplaced copy of ARRAY, with same fill-pointer and
9 adjustability (if any) as the original, unless overridden by the keyword
10 arguments. Performance depends on efficiency of general ADJUST-ARRAY in the
11 host lisp -- for most cases a special purpose copying function is likely to
13 (let ((dims (array-dimensions array
)))
14 ;; Dictionary entry for ADJUST-ARRAY requires adjusting a
15 ;; displaced array to a non-displaced one to make a copy.
18 :element-type element-type
:fill-pointer fill-pointer
19 :adjustable adjustable
:displaced-to array
)