]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/arrays/shaped/shaped.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / extra / arrays / shaped / shaped.factor
index 70f985c78d8f1123566145bf7450eda1e7a8cc8d..2577556131937bf7e7b16caf34e17104e1b26113 100644 (file)
@@ -151,10 +151,10 @@ M: sequence >col-array
 : ones ( shape -- shaped-array ) 1 repeated-shaped ;
 
 : increasing ( shape -- shaped-array )
-    [ shape-capacity iota >array ] [ ] bi <shaped-array> ;
+    [ shape-capacity <iota> >array ] [ ] bi <shaped-array> ;
 
 : decreasing ( shape -- shaped-array )
-    [ shape-capacity iota <reversed> >array ] [ ] bi <shaped-array> ;
+    [ shape-capacity <iota> <reversed> >array ] [ ] bi <shaped-array> ;
 
 : row-length ( shape -- n ) rest-slice product ; inline
 
@@ -215,7 +215,7 @@ ERROR: 2d-expected shaped ;
 
 ! : set-shaped-where ( .. elt sa quot -- )
     ! [
-        ! [ underlying>> [ length iota ] keep zip ]
+        ! [ underlying>> [ length <iota> ] keep zip ]
         ! [ ] bi
     ! ] dip '[ _ [ _ set- ] @ ] assoc-each ; inline
 
@@ -251,7 +251,7 @@ TUPLE: block-array shaped shape ;
     block-array boa ;
 
 : iteration-indices ( shaped -- seq )
-    [ iota ] [
+    [ <iota> ] [
         cartesian-product concat
         [ dup first array? [ first2 suffix ] when ] map
     ] map-reduce ;