Documentation
Returns three values: a list of added slots, a list of discarded slots
and a list of changed (according to SLOT-DEFINITION-EQUAL) slots.
Source
(defun compare-slots (old-slots slots)
"Returns three values: a list of added slots, a list of discarded slots
and a list of changed (according to SLOT-DEFINITION-EQUAL) slots."
(let ((added-slots (set-difference slots old-slots
:key #'slot-definition-name))
(discarded-slots (set-difference old-slots slots
:key #'slot-definition-name))
(changed-slots
(loop for slot in slots
for old-slot = (find (slot-definition-name slot) old-slots
:key #'slot-definition-name)
if (and old-slot
(not (slot-definition-equal slot old-slot)))
collect slot)))
(values added-slots discarded-slots changed-slots)))
Source Context