diff --git a/prototype/Doubt/SES.swift b/prototype/Doubt/SES.swift
index 7ec8b4e5d..572002c1e 100644
--- a/prototype/Doubt/SES.swift
+++ b/prototype/Doubt/SES.swift
@@ -53,17 +53,19 @@ public func SES(a: [Fix], _ b: [Fix], equals: (A, A) -> Bool, recur: (F
}
if let right = right, down = down, diagonal = diagonal {
+ let right = (right, Diff.Pure(Patch.Delete(a[i])), costOfStream(right))
+ let down = (down, Diff.Pure(Patch.Insert(b[j])), costOfStream(down))
// nominate the best edge to continue along
if let compareHere = recur(a[i], b[j]) {
let (best, diff, _) = min(
(diagonal, compareHere, costOfStream(diagonal)),
- (right, Diff.Pure(Patch.Delete(a[i])), costOfStream(right)),
- (down, Diff.Pure(Patch.Insert(b[j])), costOfStream(down))) { $0.2 < $1.2 }
+ right,
+ down) { $0.2 < $1.2 }
return cons(diff, rest: best)
} else {
let (best, diff, _) = min(
- (right, Diff.Pure(Patch.Delete(a[i])), costOfStream(right)),
- (down, Diff.Pure(Patch.Insert(b[j])), costOfStream(down))) { $0.2 < $1.2 }
+ right,
+ down) { $0.2 < $1.2 }
return cons(diff, rest: best)
}
}