mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Remove the unused Interpreter.cost
static function.
This commit is contained in:
parent
f2004a22b8
commit
77e9778f91
@ -24,11 +24,6 @@ public struct Interpreter<Term: CofreeType> {
|
||||
return c0 == c1 || !categorize(a).intersect(categorize(b)).isEmpty
|
||||
}
|
||||
|
||||
/// Computes a diff cost function from a patch cost function.
|
||||
public static func cost(cost: Patch<Term> -> Int)(_ diff: Diff) -> Int {
|
||||
return diff.map(cost).reduce(0, combine: +)
|
||||
}
|
||||
|
||||
|
||||
/// Run the interpreter over a given pair of `Term`s, producing a `Diff` as its result.
|
||||
public func run(a: Term, _ b: Term) -> Diff {
|
||||
|
Loading…
Reference in New Issue
Block a user