Page 78

57 views
Skip to first unread message

Rasheed Abdul-Aziz

unread,
Jul 15, 2012, 10:52:27 PM7/15/12
to land-o...@googlegroups.com
I don't see why the objects-at function needs the objects list. I cobbled up something that does not require it (using just my newly aquired skills, so it could be aweful)

(defun objects-at (location object-locations)
  (labels ((at-location-p (object-location)
            (eq location (cadr object-location))))
    (mapcar #'car (remove-if-not #'at-location-p object-locations))
  )
)

Is there any special reason to use two lists? Even design-wise I can't see a reason to keep a list of objects. If they're not in locations, than why would they matter?

 

Rivka Miller

unread,
Jul 20, 2012, 8:43:05 PM7/20/12
to land-o...@googlegroups.com
Its actually quite obvious
Reply all
Reply to author
Forward
0 new messages