         precondition(initialUnbalancedIndex < _elements.count)
 
         var unbalancedIndex = initialUnbalancedIndex
-        repeat {
+        while true {
             let leftChildIndex = unbalancedIndex * 2 + 1
             let rightChildIndex = unbalancedIndex * 2 + 2
 

                highestPriorityIndex = rightChildIndex
            }

            if highestPriorityIndex != unbalancedIndex {
                swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex])

                unbalancedIndex = highestPriorityIndex
            }
            else {
                break
            }
        } while true
    }
}



        while unbalancedIndex > 0 {
            let parentIndex = (unbalancedIndex - 1) / 2
            guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break }
            
            swap(&_elements[unbalancedIndex], &_elements[parentIndex])
            unbalancedIndex = parentIndex
        }
    }

