Anonymous user
Apply a callback to an array: Difference between revisions
→[[Common Lisp]]
Line 124:
[[Category:Common Lisp]]
(map nil #'print #(1 2 3 4 5))
(defun square (x) (* x x))
(map 'vector #'square #(1 2 3 4 5))
(defvar *a* (vector 1 2 3))
(map-into *a* #'1+ *a*)
|