diff --git a/prototype/Doubt/Patch.swift b/prototype/Doubt/Patch.swift index ff36b580b..e49675ae3 100644 --- a/prototype/Doubt/Patch.swift +++ b/prototype/Doubt/Patch.swift @@ -123,6 +123,7 @@ public protocol PatchType { var inverse: Self { get } init(replacing before: Element, with after: Element) + init(deleting before: Element) init(patch: Patch) } @@ -133,4 +134,8 @@ extension Patch: PatchType { public init(replacing before: A, with after: A) { self = .Replace(before, after) } + + public init(deleting before: A) { + self = .Delete(before) + } }