12 lines
235 B
Common Lisp
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)))
|