]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/math/matrices/elimination/elimination.factor
use reject instead of [ ... not ] filter.
[factor.git] / basis / math / matrices / elimination / elimination.factor
index 6dfcf9f0ca453e312625eac37c355beb4afc8480..168274a12e82ed9b3d6f84b187c794e2405439d1 100644 (file)
@@ -7,7 +7,7 @@ IN: math.matrices.elimination
 SYMBOL: matrix
 
 : with-matrix ( matrix quot -- )
-    [ swap matrix set call matrix get ] with-scope ; inline
+    matrix swap [ matrix get ] compose with-variable ; inline
 
 : nth-row ( row# -- seq ) matrix get nth ;
 
@@ -70,7 +70,7 @@ SYMBOL: matrix
     [ 0 0 (echelon) ] with-matrix ;
 
 : nonzero-rows ( matrix -- matrix' )
-    [ [ zero? ] all? not ] filter ;
+    [ [ zero? ] all? ] reject ;
 
 : null/rank ( matrix -- null rank )
     echelon dup length swap nonzero-rows length [ - ] keep ;