We still have one thing we need to describe: If there are any objects on the floor at the location we are standing in, we'll want to describe them as well. Let's first write a helper function that tells us whether an item is in a given place:
  (defun is-at (obj loc obj-loc)
    (eq (second (assoc obj obj-loc)) loc))
The eq function tells us if the symbol from the object location list is the current location.
Wizard, maybe... slob, definitely...
Let's try this out:
  (is-at 'whiskey-bottle 'living-room object-locations)
  ==> t
The symbol t (or any value other than nil) means that it's true that the whiskey-bottle is in living-room.
<< begin < previous - next > end >>