diff --git a/prototype/Doubt/Patch.swift b/prototype/Doubt/Patch.swift index 057694d1b..ac9c15fb7 100644 --- a/prototype/Doubt/Patch.swift +++ b/prototype/Doubt/Patch.swift @@ -16,17 +16,6 @@ public enum Patch: CustomDebugStringConvertible, CustomDocConvertible { } - /// The cost of a patch to the diff. - public var cost: Int { - switch self { - case .Replace: - return 2 - default: - return 1 - } - } - - public var inverse: Patch { switch self { case let .Replace(a, b): diff --git a/prototype/Doubt/SES.swift b/prototype/Doubt/SES.swift index 847b84434..93404de5a 100644 --- a/prototype/Doubt/SES.swift +++ b/prototype/Doubt/SES.swift @@ -8,7 +8,7 @@ public func SES(a: [Term], _ b: [Term], recur: (Term, Term) -> Free Int { - return diff.map { $0.cost }.iterate { syntax in + return diff.map(const(1)).iterate { syntax in switch syntax { case .Leaf: return 0 @@ -75,4 +75,5 @@ public func SES(a: [Term], _ b: [Term], recur: (Term, Term) -> Free