From 3a4f331b2e0c69a0f639b8ec141fcea22d978766 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 14:14:29 -0400 Subject: [PATCH] Document the `categorize` parameter. --- prototype/Doubt/Algorithm.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prototype/Doubt/Algorithm.swift b/prototype/Doubt/Algorithm.swift index 47c8a2358..c9d97b60c 100644 --- a/prototype/Doubt/Algorithm.swift +++ b/prototype/Doubt/Algorithm.swift @@ -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(equals: (Term, Term) -> Bool, categorize: Term -> Set) -> B { return evaluate(equals, recur: { let c0 = categorize($0)