]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/files/unique/unique.factor
Removing integers-as-sequences
[factor.git] / basis / io / files / unique / unique.factor
index f167b1e99ba32f387a454e03f379fe662c71ddde..6a00ee523b91ae31619c17315ff51a3187cc3023 100644 (file)
@@ -26,17 +26,17 @@ SYMBOL: unique-retries
 <PRIVATE
 
 : random-letter ( -- ch )
-    26 random { CHAR: a CHAR: A } random + ;
+    26 iota random { CHAR: a CHAR: A } random + ;
 
 : random-ch ( -- ch )
     { t f } random
-    [ 10 random CHAR: 0 + ] [ random-letter ] if ;
+    [ 10 iota random CHAR: 0 + ] [ random-letter ] if ;
 
 : random-name ( -- string )
     unique-length get [ random-ch ] "" replicate-as ;
 
-: retry ( quot: ( -- ? )  n -- )
-    swap [ drop ] prepose attempt-all ; inline
+: retry ( quot: ( -- ? ) n -- )
+    iota swap [ drop ] prepose attempt-all ; inline
 
 : (make-unique-file) ( path prefix suffix -- path )
     '[