1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

Return the identity diff when equal.

This commit is contained in:
Rob Rix 2015-10-14 12:29:40 -04:00
parent 517c87c303
commit b8f8953f1c

View File

@ -57,7 +57,7 @@ private let c = Term.Leaf("c")
private let d = Term.Leaf("d") private let d = Term.Leaf("d")
private func SES(a: [Term], _ b: [Term]) -> [Diff] { private func SES(a: [Term], _ b: [Term]) -> [Diff] {
return SES(a, b, recur: const(nil)) return SES(a, b) { $0 == $1 ? Diff($1) : nil }
} }
private func == (a: [Diff], b: [Diff]) -> Bool { private func == (a: [Diff], b: [Diff]) -> Bool {