Ch2 Programming

Associations and Properties

An “association list” has the form ((key1 value1) (key2 value2)). The assoc function takes in a key and returns the (key value) list .

(defparameter *info* '((good 50) (bad -10)))
(defun get-good ()
  (assoc 'good *info*))
; (get-good) => '(good 50)

For completeness, a “property list” has the form (:key1 value1 :key2 value2). You could read more about property lists or just see a few examples.

Debugging

Variables

Utility

Download the base-code.