From a34b5a34f491a7d5af882dc998dc100301242762 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 15 Oct 2015 14:12:39 -0400 Subject: [PATCH] Document the `equals` parameter. --- prototype/Doubt/Algorithm.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prototype/Doubt/Algorithm.swift b/prototype/Doubt/Algorithm.swift index 6d827a839..47c8a2358 100644 --- a/prototype/Doubt/Algorithm.swift +++ b/prototype/Doubt/Algorithm.swift @@ -110,6 +110,9 @@ extension Algorithm where B: FreeConvertible, B.RollType == Term.LeafType, B.Pur return evaluate(equals, recur: { Algorithm($0, $1).evaluate(equals).free }) } + /// Evaluate the algorithm. + /// + /// `equals` compares two terms for equality. It should be strictly syntactic equality, ignoring any annotations/metadata on the terms. public func evaluate(equals: (Term, Term) -> Bool, categorize: Term -> Set) -> B { return evaluate(equals, recur: { let c0 = categorize($0)