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

zip the terms.

This commit is contained in:
Rob Rix 2015-10-22 18:42:04 -04:00
parent b210cf8586
commit f8739e90b0

View File

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