Macro: RUCKSACK-DO-CLASS

Documentation

Evaluate BODY for each instance of CLASS, with INSTANCE-VAR successively bound to each instance. See the documentation of RUCKSACK-MAP-CLASS for more details.

Source

(defmacro rucksack-do-class ((instance-var class
                              &key
                              (rucksack '*rucksack*)
                              id-only
                              (include-subclasses t))
                             &body body)
  "Evaluate BODY for each instance of CLASS, with INSTANCE-VAR
successively bound to each instance.  See the documentation of
RUCKSACK-MAP-CLASS for more details."
  (check-type instance-var symbol)
  `(rucksack-map-class ,rucksack ,class
                       (lambda (,instance-var) ,@body)
                       :id-only ,id-only
                       :include-subclasses ,include-subclasses))
Source Context