From fed0d91d30df699d6f288b037ab68f7e9f0fa03d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 11:19:14 -0400 Subject: [PATCH] Use the patch constructors in SES. --- prototype/Doubt/SES.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prototype/Doubt/SES.swift b/prototype/Doubt/SES.swift index 93404de5a..b7c03cf85 100644 --- a/prototype/Doubt/SES.swift +++ b/prototype/Doubt/SES.swift @@ -4,8 +4,8 @@ public func SES(a: [Term], _ b: [Term], recur: (Term, Term) -> Free>?) -> [Free>] { typealias Diff = Free> - if a.isEmpty { return b.map { Diff.Pure(Patch.Insert($0)) } } - if b.isEmpty { return a.map { Diff.Pure(Patch.Delete($0)) } } + if a.isEmpty { return b.map { .Insert($0) } } + if b.isEmpty { return a.map { .Delete($0) } } func cost(diff: Diff) -> Int { return diff.map(const(1)).iterate { syntax in @@ -46,8 +46,8 @@ public func SES(a: [Term], _ b: [Term], recur: (Term, Term) -> Free