]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/lcs/lcs.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / basis / lcs / lcs.factor
index 7c0b62224c4144a3f9642d574e998879c14b5d3f..fc7589209ab47e441e8b39cb189d3684f42d9f26 100644 (file)
@@ -20,15 +20,15 @@ TYPED:: loop-step ( i j matrix: array old new step -- )
     i 1 + j 1 + matrix nth-unsafe set-nth-unsafe ; inline
 
 : lcs-initialize ( |str1| |str2| -- matrix )
-    iota [ drop 0 <array> ] with map ;
+    <iota> [ drop 0 <array> ] with map ;
 
 : levenshtein-initialize ( |str1| |str2| -- matrix )
-    [ iota ] bi@ [ [ + ] curry map ] with map ;
+    [ <iota> ] bi@ [ [ + ] curry map ] with map ;
 
 :: run-lcs ( old new init step -- matrix )
     old length 1 + new length 1 + init call :> matrix
-    old length iota [| i |
-        new length iota [| j |
+    old length <iota> [| i |
+        new length <iota> [| j |
             i j matrix old new step loop-step
         ] each
     ] each matrix ; inline