 }
 
 extension SortedArray {
-    /// Searches the array for `newElement` using binary search.
-    ///
-    /// - Returns: If `newElement` is in the array, returns `.found(at: index)`
+    /// Searches the array for `element` using binary search.
+    ///
+    /// - Returns: If `element` is in the array, returns `.found(at: index)`
     ///   where `index` is the index of the element in the array.
-    ///   If `newElement` is not in the array, returns `.notFound(insertAt: index)`
+    ///   If `element` is not in the array, returns `.notFound(insertAt: index)`
     ///   where `index` is the index where the element should be inserted to 
     ///   preserve the sort order.
-    ///   If the array contains multiple elements that are equal to `newElement`,
+    ///   If the array contains multiple elements that are equal to `element`,
     ///   there is no guarantee which of these is found.
     ///
     /// - Complexity: O(_log(n)_), where _n_ is the size of the array.
-    fileprivate func search(for newElement: Element) -> Match<Index> {
+    fileprivate func search(for element: Element) -> Match<Index> {
         guard !isEmpty else { return .notFound(insertAt: endIndex) }
         var left = startIndex
         var right = index(before: endIndex)

        guard var match = anyIndex(of: element) else { return nil }
        // Walk backward to find the first matching element (in case there are duplicates)
        while let predecessor = index(match, offsetBy: -1, limitedBy: startIndex) {
            if compare(lhs: self[predecessor], rhs: element) == .orderedSame {
                match = predecessor
            } else {
                break

        // Walk forward to find the last matching element (in case there are duplicates)
        let lastValidIndex = index(before: endIndex)
        while let successor = index(match, offsetBy: 1, limitedBy: lastValidIndex) {
            if compare(self[successor], element) == .orderedSame {
                match = successor
            } else {
                break
