Say I wrote
(setf s (make-array (list 9 9) :element-type 'bit))
so s is a 9x9 bit matrix.
and I want to get the 1st row s. How to get it?
I could do the following:
(setf s (make-array 9 :element-type 'array :initial-element (make-array 9 :element-type 'bit)))
and access the first line (svref s 0).
But I want to know if there is a built-in way.
(And the 2-dimensional array seems to allocate fewer bytes).
source share