RosettaCodeData/Task/Associative-array-Iteration/Common-Lisp/associative-array-iteration-6.lisp

12 lines
361 B
Common Lisp
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
;; Project : Associative array/Iteration
(setf x (make-array '(3 2)
:initial-contents '(("hello" 13 ) ("world" 31) ("!" 71))))
(setf xlen (array-dimensions x))
(setf len (car xlen))
(dotimes (n len)
(terpri)
(format t "~a" (aref x n 0))
(format t "~a" " : ")
(format t "~a" (aref x n 1)))