mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
Implement a function copying terms into diffs.
This commit is contained in:
parent
a628177722
commit
a1a832012e
@ -38,6 +38,9 @@ public func SES<A>(a: [Fix<A>], _ b: [Fix<A>], equals: (A, A) -> Bool, recur: (F
|
||||
let diagonal = matrix[i + 1, j + 1]
|
||||
|
||||
let diff = recur(a[i], b[j])
|
||||
func copy(term: Term) -> Diff {
|
||||
return Diff.Roll(term.out.map(copy))
|
||||
}
|
||||
|
||||
if let right = right, down = down, diagonal = diagonal {
|
||||
let costs = (right: costOfStream(right), down: costOfStream(down), diagonal: costOfStream(diagonal))
|
||||
|
Loading…
Reference in New Issue
Block a user