1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Add a Delete constructor to Free when used as a diff.

This commit is contained in:
Rob Rix 2015-10-15 11:11:06 -04:00
parent ce633f555a
commit 9e80e0c903

View File

@ -130,6 +130,10 @@ extension Free where B: PatchConvertible, B.Element == Cofree<A, ()> {
public static func Insert(after: B.Element) -> Free {
return .Pure(B(patch: .Insert(after)))
}
public static func Delete(before: B.Element) -> Free {
return .Pure(B(patch: .Delete(before)))
}
}