This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Data describing object locations

1 post · 3714 views

I need help with the following question below and im new too this...

Data describing object locations is held in a series of lists of the form…
(object-id category super-category location)
eg:
(defparameter *obj-data*
‘((apple#3 apple fruit kitchen)
(mango#5 mango fruit kitchen)
(tom cat agent hallway)
(jerry mouse agent bedroom)
-etc-
))

Write a function which takes three arguments (i) a super-category (ii) a location name (iii) a data
set and returns a nil/non-nil value (indicating false/true) indicating whether an instance of the
super-category can be found in the named location (NB: your solution will be better if the non-nil
values it returns are useful).