mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
zip the terms.
This commit is contained in:
parent
b210cf8586
commit
f8739e90b0
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user