1
1
mirror of https://github.com/github/semantic.git synced 2024-12-28 09:21:35 +03:00

Move the run method to the top.

This commit is contained in:
Rob Rix 2015-10-15 14:16:01 -04:00
parent 58b8fc2fe6
commit 98398f6fd0

View File

@ -9,6 +9,12 @@ public struct Interpreter<Term: TermType> {
self.cost = cost
}
public func run(a: Term, _ b: Term) -> Diff {
return recur(a, b) ?? .Replace(a, b)
}
private let equal: (Term, Term) -> Bool
private let comparable: (Term, Term) -> Bool
private let cost: Diff -> Int
@ -60,10 +66,6 @@ public struct Interpreter<Term: TermType> {
return recur(f(SES(a, b, cost: cost, recur: recur)))
}
}
public func run(a: Term, _ b: Term) -> Diff {
return recur(a, b) ?? .Replace(a, b)
}
}