Data describing object locations
Posted: Thu Oct 23, 2014 9:44 am
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).
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).