]> gitweb.factorcode.org Git - factor.git/commitdiff
math.matrices: fix unshaped-cols-iota to use (each-from)
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 25 Jan 2022 18:07:08 +0000 (10:07 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 25 Jan 2022 18:07:08 +0000 (10:07 -0800)
basis/math/matrices/matrices.factor

index eeddbc06cd0222434eba17da402d2d74b0a8ceb3..68cbfa4414f8b9d66e6394b52259e1e9a43e9f91 100644 (file)
@@ -121,8 +121,8 @@ ALIAS: transpose flip
   first-unsafe length <iota> ; inline
 
 : unshaped-cols-iota ( matrix -- cols-iota )
-  [ first-unsafe length ] keep
-  [ length min ] (each) (each-integer) <iota> ; inline
+  [ first-unsafe length ] keep
+  [ length min ] 1 (each-from) (each-integer) <iota> ; inline
 
 : generic-anti-transpose-unsafe ( cols-iota matrix -- newmatrix )
     [ <reversed> [ nth-end-unsafe ] with { } map-as ] curry { } map-as ; inline