anchor.diff:                  (heap-%size heap) new-size
                   (heap-vector heap) vector)))
         ;; Mark the heap dirty, and insert the element at the end of the vector.
  -      (setf (heap-dirty heap) t
  +      (setf (heap-state heap) :dirty
               (aref vector (incf count)) elt
               (heap-%count heap) count)
         ;; Restore heap property.
  
positive.code: 
  (defconstant max-heap-size (- heap-size-limit 1))
  
  (defun heap-insert (elt heap)
    "Insert ELT to HEAP. Returns ELT."
    (declare (heap heap))
    (with-locked-heap (heap)
      (when (heap-dirty heap)
        (error "Heap dirty on entry to HEAP-INSERT."))
      (let* ((vector (heap-vector heap))
             (pred (heap-predicate heap))
             (size (heap-size heap))
  
negative.code:                                                         (setf (aref vector 0) +empty+)
                                                          vector))))
               (:copier nil))
    "A thread-safe binary heap.
  
  Heap operations which need a consistent heap geometry lock the heap. Users can
  also group multiple heap operations into atomic units using WITH-LOCKED-HEAP.
  
  Thread-safety is implemented using a single lock per heap. While PILEUP:HEAP
  is fine for heaps used from multiple threads, a more specialized solution is
  recommended when the heap is highly contested between multiple threads."
    (name nil :read-only t)
    ;; One longer than SIZE: we keep the min element in both 0 and 1. Using
    ;; 1-based addressing makes heap calculations simpler, and keeping a
    ;; separate reference in 0 allows HEAP-MIN to be lockless.
  