Is there a way to dynamically ask for bindings in another package, and by dynamically i mean by not knowing the exact name of a binding in some package. A concrete case would be:
As in package B, i know there exists a package A which has a certain class and i extract all direct slots of that class by (in LispWorks):
(setq direct-slots (mapcar #'slot-definition-name
(class-direct-slots (class-of class-in-package-A))))
Now i want to bind those slots to some values using MAPCAR:
(mapcar #'(lambda (slot) (list slot
(funcall slot class-in-package-A)))
direct-slots)
This doesn't work since i am in package B and need package precision for the call to (funcall slot class-in-package-A)
, packageA::slot
is obviously wrong. Is there a function for this which searchs for a certain symbol in a package?