anchor.diff:              | TerDenBinary -> 32                       
          
           /// For a key identified by its index `n` in the heap, return the index of that key's kth child.
  -        let private indexOfKthChild dheap n k =         
  +        let private indexOfKthChild (dheap: DHeap<'T>) (n: int) (k: int) : int =         
               (n <<< dheap.TreeNodeChildCountAsPowerOfTwoExponent) + k
   
           /// For a key identified by its index `n` in the heap, return the index of its parent.
  -        let private indexOfParent dheap n =              
  +        let private indexOfParent (dheap: DHeap<'T>) (n: int) : int =              
               (n - 1) >>> dheap.TreeNodeChildCountAsPowerOfTwoExponent // note this will not work if passed index 0, the root index of the heap tree (which is guarded against)
   
           /// Exchange the positions of two elements specified by index in the heap's array 
  -        let private swap dheap index1 index2 = 
  +        let private swap (dheap: DHeap<'T>) (index1: int) (index2: int) = 
               let tmp = dheap.Heap.[index1]
               dheap.Heap.[index1] <- dheap.Heap.[index2]
               dheap.Heap.[index2] <- tmp
   
           /// Is the element at index1 higher priority than the element at index2
  -        let private isHigherPriority dheap index1 index2 = 
  +        let private isHigherPriority (dheap: DHeap<'T>) (index1: int) (index2: int) : bool = 
               let elem1 = dheap.Heap.[index1]
               let elem2 = dheap.Heap.[index2]
               dheap.IsHigherPriorityComparer elem1 elem2
   
           /// Return highest priority child index of a parent 'index'
  -        let private highestPriorityChildIndex dheap index =
  +        let private highestPriorityChildIndex (dheap: DHeap<'T>) (index: int) : int =
               let firstChildIndex = indexOfKthChild dheap index 1
               let lastChildIndex = indexOfKthChild dheap index dheap.TreeNodeChildCount
               let heapSize = (size dheap)
  
positive.code:     module DHeap = 
  
          /// Return the number of entries in the dheap priority queue
          let size dheap = 
              dheap.Heap.Count
  
          /// Is the dheap priority queue empty
          let isEmpty dheap = 
              dheap.Heap.Count = 0
  
  
          /// Convert a power of two number into its value as a power of two integer exponent
          let private asPowerOfTwoExponent n = 
              Math.Log(float n, 2.0) |> int
      
          /// Extract the capacity value or return a default.
          let private capacityValue capacity = 
              match capacity with
              | Capacity(cap) -> int cap 
              | DefaultCapacity -> 16
  
          /// Return the arity of a tree node in the heap as an integer
          let private arityToInteger arity = 
              match arity with
              | Binary -> 2
              | Quaternary -> 4
  
negative.code:                 fail EmptyHeap
      
                  
      let minBinaryHeap : (unit -> DHeap<'T>) = fun _ -> DHeap.empty Binary MinKey DefaultCapacity 
      let maxBinaryHeap : (unit -> DHeap<'T>) = fun _ -> DHeap.empty Binary MaxKey DefaultCapacity
      let minQuaternaryHeap : (unit -> DHeap<'T>) = fun _ -> DHeap.empty Quaternary MinKey DefaultCapacity 
      let maxQuaternaryHeap : (unit -> DHeap<'T>) = fun _ -> DHeap.empty Quaternary MaxKey DefaultCapacity 
  
      let minBinaryHeapWith (items: seq<'T>) : DHeap<'T> = DHeap.ofSeq Binary MinKey DefaultCapacity items
      let maxBinaryHeapWith (items: seq<'T>) : DHeap<'T> = DHeap.ofSeq Binary MaxKey DefaultCapacity items
      let minQuaternaryHeapWith (items: seq<'T>) : DHeap<'T> = DHeap.ofSeq Quaternary MinKey DefaultCapacity items
      let maxQuaternaryHeapWith (items: seq<'T>) : DHeap<'T> = DHeap.ofSeq Quaternary MaxKey DefaultCapacity items
  
  
  
  