From 1b41bf3cfa0261e6949f132e424e41b364b2ec7a Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Mon, 22 Jan 2018 01:30:52 +0100 Subject: [PATCH] boolean-expr: use sequences:partition --- extra/boolean-expr/boolean-expr.factor | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/extra/boolean-expr/boolean-expr.factor b/extra/boolean-expr/boolean-expr.factor index 2fa0ed3d5e..e65cad440c 100644 --- a/extra/boolean-expr/boolean-expr.factor +++ b/extra/boolean-expr/boolean-expr.factor @@ -65,11 +65,8 @@ GENERIC: satisfiable? ( expr -- ? ) METHOD: satisfiable? { ⊤ } drop t ; METHOD: satisfiable? { ⊥ } drop f ; -: partition ( seq quot -- left right ) - [ [ not ] compose filter ] [ filter ] 2bi ; inline - : (satisfiable?) ( seq -- ? ) - [ \ ¬ instance? ] partition [ x>> ] map intersect empty? ; + [ \ ¬ instance? ] partition swap [ x>> ] map intersect empty? ; METHOD: satisfiable? { □ } cnf [ (satisfiable?) ] any? ;