Multidimensional Arrays
(setq a (make-array '(5 10)
:initial-element 1))
#2A((1 1 1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1 1 1))
(setf (aref a 4 9) 2)
2
(let ((sum 0))
(dotimes (i 5 sum)(dotimes (j 10)
(incf sum (aref a i j)) )) )
51
Previous slide
Next slide
Back to first slide
View graphic version