Hi Konstantinos. Welcome to Lisp!
How did you invoke objects-at?
I copied the relevant code from the book
(defparameter *objects* '(whiskey bucket frog chain))
(defparameter *object-locations* '((whiskey living-room)
(bucket living-room)
(chain garden)
(frog garden)))
(defun objects-at (loc objs obj-locs)
(labels ((at-loc-p (obj)
(eq (cadr (assoc obj obj-locs)) loc)))
(remove-if-not #'at-loc-p objs)))
Note: in general I recommend typing in code yourself when you are learning new stuff, and you may be doing that, but I wanted to make sure I got it right quickly and just copied it.
Then I ran:
(objects-at 'garden *objects* *object-locations*)
=> (FROG CHAIN)
So, two questions:
1. How are you invoking objects-at?
2. Did you double-check all the code?
We can also talk about how it works, if you want.
I’ve confused myself with both of those in previous learning experiences….
Best,
Win
Win Treese
tre...@acm.org
> --
> You received this message because you are subscribed to the Google Groups "Land of Lisp" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
land-of-lisp...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/land-of-lisp/e0928a36-42bb-4b46-b33c-19152a538677n%40googlegroups.com.