From b60abdf5b05c52c2279681a8fb511b925aa117f8 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 14 Oct 2015 15:46:19 -0400 Subject: [PATCH] Factoring. --- prototype/Doubt/Algorithm.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/prototype/Doubt/Algorithm.swift b/prototype/Doubt/Algorithm.swift index 00c6765be..7ff5d764f 100644 --- a/prototype/Doubt/Algorithm.swift +++ b/prototype/Doubt/Algorithm.swift @@ -127,11 +127,7 @@ extension Algorithm where Term: Equatable, B: FreeConvertible, B.RollType == Ter extension Algorithm where Term: Categorizable, B: FreeConvertible, B.RollType == Term.LeafType, B.PureType == Algorithm.Patch { public func evaluate(equals: (Term, Term) -> Bool) -> B { - return evaluate(equals, recur: { - ($0.categories.isEmpty || $1.categories.isEmpty) && !$0.categories.intersect($1.categories).isEmpty - ? Algorithm($0, $1).evaluate(equals).free - : nil - }) + return evaluate(equals, categorize: { $0.categories }) } }