anchor.diff:      }
                   
       /// A mutable D-ary heap Abstact Data Type (ADT) supporting the basic operations:
  -    /// - insert, extractHighestPriority ("remove" "delete" "pop"), highestPriority ("peek") with O(n log n) complexity
  -    /// - size, isEmpty with O(1) and pure functions
  +    /// - insert, extractHighestPriority ("remove" "delete" "pop"), highestPriority ("peek") and extractHighestPriorityAndInsert all with O(n log n) complexity
  +    /// - size, isEmpty with O(1) complexity are pure functions
       [<RequireQualifiedAccess; CompilationRepresentation (CompilationRepresentationFlags.ModuleSuffix)>]
       module DHeap = 
   
  
positive.code:         let size dheap = 
              dheap.Heap.Count
  
              /// Is the dheap priority queue empty
          let isEmpty dheap = 
              dheap.Heap.Count = 0
  
  
negative.code:                 ok highest
              else
                  fail EmptyHeap
  
          /// Insert a key into and extract the highest priority key from the dheap priority queue
          /// Purely a performance optimisation that reduces the heap maintenance cost over separately
          /// calling `extractHighestPriority` then `insert`.
          let extractHighestPriorityAndInsert dheap (newKey: 'T) : HeapResult<'T> = 
              if not(isEmpty dheap) then
                  let highest = dheap.Heap.[0]
                  dheap.Heap.[0] <- newKey
                  sink dheap 0
                  ok highest
              else
                  fail EmptyHeap
      
                  
      let minBinaryHeap = fun _ -> DHeap.empty Binary MinKey DefaultCapacity 
  