mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
Document the categorize
parameter.
This commit is contained in:
parent
a34b5a34f4
commit
3a4f331b2e
@ -113,6 +113,8 @@ extension Algorithm where B: FreeConvertible, B.RollType == Term.LeafType, B.Pur
|
||||
/// Evaluate the algorithm.
|
||||
///
|
||||
/// `equals` compares two terms for equality. It should be strictly syntactic equality, ignoring any annotations/metadata on the terms.
|
||||
///
|
||||
/// `categorize` provides sets of categories for terms. If the categories of two terms are distinct and non-intersecting, then the terms should not be compared in e.g. SES. This is provided as a parameter so that `Term` need not be `Categorizable` in order to use it.
|
||||
public func evaluate<C>(equals: (Term, Term) -> Bool, categorize: Term -> Set<C>) -> B {
|
||||
return evaluate(equals, recur: {
|
||||
let c0 = categorize($0)
|
||||
|
Loading…
Reference in New Issue
Block a user