RosettaCodeData/Task/Associative-array-Iteration/NewLISP/associative-array-iteration-1.l
2024-10-16 18:07:41 -07:00

12 lines
235 B
Common Lisp

;; using an association list:
(setq alist '(("A" "a") ("B" "b") ("C" "c")))
;; list keys
(map first alist)
;; list values
(map last alist)
;; loop over the assocation list:
(dolist (elem alist)
(println (format "%s -> %s" elem)))