From 742fc0ea0f25571b0048dd0b616f79c36d66e1af Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 14 Oct 2015 17:51:01 -0400 Subject: [PATCH] Correct the categorization test. This implies that uncategorized nodes can be compared with anything. --- prototype/Doubt/Algorithm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prototype/Doubt/Algorithm.swift b/prototype/Doubt/Algorithm.swift index 7ff5d764f..0c2f9e2d1 100644 --- a/prototype/Doubt/Algorithm.swift +++ b/prototype/Doubt/Algorithm.swift @@ -112,7 +112,7 @@ extension Algorithm where B: FreeConvertible, B.RollType == Term.LeafType, B.Pur public func evaluate(equals: (Term, Term) -> Bool, categorize: Term -> Set) -> B { return evaluate(equals, recur: { - (categorize($0).isEmpty || categorize($1).isEmpty) && !categorize($0).intersect(categorize($1)).isEmpty + categorize($0).isEmpty || categorize($1).isEmpty || !categorize($0).intersect(categorize($1)).isEmpty ? Algorithm($0, $1).evaluate(equals).free : nil })