mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Use the convenience constructor.
This commit is contained in:
parent
aca676dd04
commit
f4a9053977
@ -45,7 +45,7 @@ public struct Interpreter<Term: CofreeType> {
|
||||
// If both terms are equal, we don’t need to bother diffing.
|
||||
//
|
||||
// In that case, zip the two terms together (to pair their annotations), and then map the resulting `Term` (which, since the terms are equal, will be non-nil) into a `Diff`.
|
||||
if equal(a, b) { return hylo(Diff.Roll, Cofree.eliminate)(Term.zip(a, b)!) }
|
||||
if equal(a, b) { return Diff(Term.zip(a, b)!) }
|
||||
guard comparable(a, b) else { return nil }
|
||||
|
||||
let algorithm: Algorithm<Term, Diff>
|
||||
|
Loading…
Reference in New Issue
Block a user