1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Copy diffs recursively using ana.

This commit is contained in:
Rob Rix 2015-10-22 13:15:13 -04:00
parent f36651660b
commit f00f3f485f

View File

@ -42,7 +42,7 @@ public struct Interpreter<Term: TermType> {
/// Diff `a` against `b`, if comparable.
private func recur(a: Term, _ b: Term) -> Diff? {
if equal(a, b) { return Diff(b) }
if equal(a, b) { return Diff.ana(Term.unwrap)(b) }
guard comparable(a, b) else { return nil }
let algorithm: Algorithm<Term, Diff>