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


        while unbalancedIndex > 0 {
            let parentIndex = (unbalancedIndex - 1) / 2

            if _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) {
                swap(&_elements[unbalancedIndex], &_elements[parentIndex])

                unbalancedIndex = parentIndex
            }
            else {
                break
            }
        }
    }


                highestPriorityIndex = rightChildIndex
            }

            guard highestPriorityIndex != unbalancedIndex else { break }

            swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex])
            unbalancedIndex = highestPriorityIndex
        }
    }
}

