(pushnew function (sequencer-item-functions item))))
(defmethod invoke-sequencer-items ((sequencer sequencer) &rest arguments)
- (dolist (item (merge-lists (reverse (sequencer-constraints sequencer))))
- (dolist (function (reverse (sequencer-item-functions item)))
- (apply function arguments))))
+ #+debug
+ (format *debug-io* "~@<;; ~@;Constraints: ~_~
+ ~<~@{~< * ~;~@{~S~^, ~:_~}~:>~:@_~}~:>~:>"
+ (mapcar (lambda (constraint)
+ (mapcar #'sequencer-item-name constraint))
+ (sequencer-constraints sequencer)))
+ (let ((seen (make-hash-table)))
+ (dolist (item (merge-lists (reverse (sequencer-constraints sequencer))))
+ (setf (gethash item seen) t)
+ (dolist (function (reverse (sequencer-item-functions item)))
+ (apply function arguments)))
+ (maphash (lambda (name item)
+ (unless (gethash item seen)
+ (warn "Unused output item ~S" name)))
+ (sequencer-table sequencer))))
;;;----- That's all, folks --------------------------------------------------