anchor.diff:            finally (setf (aref heap i) new-item))
       heap))
   
  -(defun heap-maximum (heap)
  +(defun heap-minimum (heap)
     (unless (zerop (length heap))
       (aref heap 0)))
   
  -(defun heap-extract (heap i &key (key #'identity) (test #'>=))
  +(defun heap-extract (heap i &key (key #'identity) (test #'<=))
     (when (< (length heap) i)
       (error "Heap underflow"))
     (prog1
  
positive.code:         (heapify heap largest :key key :test test)))
      heap))
  
  (defun heap-insert (heap new-item &key (key #'identity) (test #'>=))
    (declare (function key test))
    (flet ((key (obj) (funcall key obj))
           (ge (i j) (funcall test i j)))
  
negative.code:       (when i
          (heap-extract contents i :key keyfun :test #'<=)))))
  
  ;;;
  ;;; Util
  ;;;
  
  (defvar *test-event-queue* (make-priority-queue :key #'exec-time))
  
  
  