Coverage report: /home/ellis/.stash/quicklisp/dists/quicklisp/software/alexandria-20241012-git/alexandria-1/arrays.lisp

KindCoveredAll%
expression028 0.0
branch02 0.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 (in-package :alexandria)
2
 
3
 (defun copy-array (array &key (element-type (array-element-type array))
4
                               (fill-pointer (and (array-has-fill-pointer-p array)
5
                                                  (fill-pointer array)))
6
                               (adjustable (adjustable-array-p array)))
7
   "Returns an undisplaced copy of ARRAY, with same fill-pointer and
8
 adjustability (if any) as the original, unless overridden by the keyword
9
 arguments."
10
  (let* ((dimensions (array-dimensions array))
11
         (new-array (make-array dimensions
12
                                :element-type element-type
13
                                :adjustable adjustable
14
                                :fill-pointer fill-pointer)))
15
    (dotimes (i (array-total-size array))
16
      (setf (row-major-aref new-array i)
17
            (row-major-aref array i)))
18
    new-array))