Function: find-instances*

Documentation

Find all instances that belong to the class and its subclasses

Source

(defun find-instances* (class)
  "Find all instances that belong to the class and its subclasses" 
  (let* ((class-name (^class-name class))
	 (sub-classes (mop:class-direct-subclasses (find-class class-name)))) 
    (append (find-instances class)
	    (mappend (fn (sub-class) (find-instances* sub-class))
		     sub-classes))))
Source Context