]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/regexp/classes/classes.factor
use reject instead of [ ... not ] filter.
[factor.git] / basis / regexp / classes / classes.factor
index db420839e16f3b889462df795278cc495e868e5c..7ad452a0b03c9fbe993fe5da523b48cdeec7e12a 100644 (file)
@@ -168,17 +168,15 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ;
     class-partition boa ;
 
 : class-partition>sequence ( class-partition -- seq )
-    [
-        {
-            [ integers>> ]
-            [ not-integers>> ]
-            [ simples>> ]
-            [ not-simples>> ]
-            [ and>> ]
-            [ or>> ]
-            [ other>> ]
-        } cleave
-    ] output>array concat ;
+    {
+        [ integers>> ]
+        [ not-integers>> ]
+        [ simples>> ]
+        [ not-simples>> ]
+        [ and>> ]
+        [ or>> ]
+        [ other>> ]
+    } cleave>array concat ;
 
 : repartition ( partition -- partition' )
     ! This could be made more efficient; only and and or are effected
@@ -219,7 +217,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ;
     dup
     [ simples>> ] [ not-simples>> ] [ and>> ] tri
     3append or-class boa
-    '[ [ _ class-member? not ] filter ] change-integers ;
+    '[ [ _ class-member? ] reject ] change-integers ;
 
 : answer-ands ( partition -- partition' )
     dup [ integers>> ] [ not-simples>> ] [ simples>> ] tri 3append