]> gitweb.factorcode.org Git - factor.git/commitdiff
use iota in a couple of places
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Aug 2009 00:56:16 +0000 (20:56 -0400)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 23 Aug 2009 00:56:16 +0000 (20:56 -0400)
core/sequences/sequences-tests.factor
core/sequences/sequences.factor

index 2aa95b23ab084f2e7cb9f62ce35ac8101ea96c75..e36bfaf9d24e4d92063a958e3da2453491cafade 100644 (file)
@@ -293,4 +293,4 @@ USE: make
 [ 1 { "a" "b" "c" } [ [ dup , ] [ , ] interleave drop ] { } make ] unit-test
 
 [ t ] [ 0 array-capacity? ] unit-test
-[ f ] [ -1 array-capacity? ] unit-test
\ No newline at end of file
+[ f ] [ -1 array-capacity? ] unit-test
index 031d5f7b4a2ce8102987ea1a8c02bc0ea2a94542..177a157994b64cc133c1300beff6d07e692bb3b1 100755 (executable)
@@ -919,7 +919,7 @@ PRIVATE>
 <PRIVATE
 
 : generic-flip ( matrix -- newmatrix )
-    [ dup first length [ length min ] reduce ] keep
+    [ dup first length [ length min ] reduce iota ] keep
     [ [ nth-unsafe ] with { } map-as ] curry { } map-as ; inline
 
 USE: arrays
@@ -929,7 +929,7 @@ USE: arrays
 
 : array-flip ( matrix -- newmatrix )
     { array } declare
-    [ dup first array-length [ array-length min ] reduce ] keep
+    [ dup first array-length [ array-length min ] reduce iota ] keep
     [ [ { array } declare array-nth ] with { } map-as ] curry { } map-as ;
 
 PRIVATE>