 
         var y2 = x2 - kIndex2
 
-        while x2 < arrayALength && y2 < arrayBLength && (inArrayA[arrayALength - x2 - 1] == inArrayB[arrayBLength - y2 - 1]) {
+        while x2 < inArrayA.count && y2 < inArrayB.count && (inArrayA[inArrayA.count - x2 - 1] == inArrayB[inArrayB.count - y2 - 1]) {
             x2 += 1
             y2 += 1
         }
 
         vectors2[k2Offset] = x2
 
-        if x2 > arrayALength {
+        if x2 > inArrayA.count {
             // Ran off the left of the graph.
             k2end += 2
-        } else if y2 > arrayBLength {
+        } else if y2 > inArrayB.count {
             // Ran off the top of the graph.
             k2start += 2
         } else if !front {
             let k1Offset = vOffset + delta - kIndex2
 
-            if k1Offset >= 0 && k1Offset < vLength && v1[k1Offset] != -1 {
-                let x1 = v1[k1Offset]
+            if k1Offset >= 0 && k1Offset < vLength && vectors1[k1Offset] != -1 {
+                let x1 = vectors1[k1Offset]
                 let y1 = vOffset + x1 - k1Offset
                 // Mirror x2 onto top-left coordinate system.
-                x2 = arrayALength - x2
+                x2 = inArrayA.count - x2
 
                 if x1 >= x2 {
                     // Overlap detected.

    return haveFoundDiffs
}

private func walkReservePath<T: Equatable>(kIndex2: inout Int, _ currentD: Int, _ k2end: inout Int, _ vOffset: Int, _ vectors2: inout [Int], _ arrayALength: Int, _ arrayBLength: Int, _ inArrayA: [T], _ inArrayB: [T], _ k2start: inout Int, _ front: Bool, _ delta: Int, _ vLength: Int, _ v1: inout [Int], _ diffs: inout [Diff<T>], _ haveFoundDiffs: inout Bool) {
    while kIndex2 <= currentD - k2end {

        defer {

                              diffs: inout [Diff<T>]) -> Bool {

    var haveFoundDiffs = false // assume
    while kIndex1 <= parameters.currentD - k1end {
        defer {
            kIndex1 += 2
        }
        let k1Offset = parameters.vOffset + kIndex1
        var x1 = 0

        if kIndex1 == -parameters.currentD || (kIndex1 != parameters.currentD && vectors1[k1Offset - 1] < vectors1[k1Offset + 1]) {
            x1 = vectors1[k1Offset + 1]
        } else {
            x1 = vectors1[k1Offset - 1] + 1
