Hi,
Is there a better way to copy multi-dimensional arrays in lisp
than element-by-element? If not, does anyone know why there are
copy-list, copy-seq, copy-alist, copy-symbol, copy-tree, etc., but no
copy-array function? I wrote my own like this but it just seemed
strange that I couldn't find a function to do this in lisp.
(defun copy-array (a)
(let ((newa (make-array (array-dimensions a))))
(dotimes (i (array-total-size a) newa)
(setf (row-major-aref newa i) (row-major-aref a i)))))
--
Adam P. Jenkins
···············@cs.umass.edu
University of Massachusetts/Amherst
Office Number: (413) 545-3506