]> gitweb.factorcode.org Git - factor.git/commitdiff
use itoa in more places
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 2 Aug 2009 23:18:31 +0000 (18:18 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 2 Aug 2009 23:18:31 +0000 (18:18 -0500)
core/checksums/checksums.factor
core/combinators/combinators.factor
core/generic/single/single.factor
core/io/binary/binary.factor
core/sequences/sequences.factor

index 0dd808c7227faf0d88c066b014ff58431b896f9b..5fe46b532f40f9cbe5b54dd08996028a2c65c4af 100644 (file)
@@ -56,7 +56,7 @@ M: checksum checksum-lines
     [ B{ CHAR: \n } join ] dip checksum-bytes ;
 
 : checksum-file ( path checksum -- value )
-    #! normalize-path (file-reader) is equivalen to
+    #! normalize-path (file-reader) is equivalent to
     #! binary <file-reader>. We use the lower-level form
     #! so that we can move io.encodings.binary to basis/.
     [ normalize-path (file-reader) ] dip checksum-stream ;
index 54037b899e2b85587d0eb872ea9350a3f23d0da2..2bef1a568a1b3dd99d6b350aa56cb56e11a56963 100755 (executable)
@@ -113,7 +113,7 @@ ERROR: no-case object ;
     ] if ;
 
 : <buckets> ( initial length -- array )
-    next-power-of-2 swap [ nip clone ] curry map ;
+    next-power-of-2 iota swap [ nip clone ] curry map ;
 
 : distribute-buckets ( alist initial quot -- buckets )
     swapd [ [ dup first ] dip call 2array ] curry map
index 9a773f43a2b5c0f78fe38afb6896243cbd0ec365..88387abd5cfcc0daee887e41046dff8acb12d214 100644 (file)
@@ -145,7 +145,7 @@ GENERIC: compile-engine ( engine -- obj )
     default get <array> [ <enum> swap update ] keep ;
 
 : lo-tag-number ( class -- n )
-    "type" word-prop dup num-tags get member?
+    "type" word-prop dup num-tags get iota member?
     [ drop object tag-number ] unless ;
 
 M: tag-dispatch-engine compile-engine
index cf2781aac074c1022d45e99f79fb63f2d4760a14..f5467daea6bc1b053584319d1bdbd98ed88051bc 100644 (file)
@@ -10,7 +10,7 @@ IN: io.binary
 
 : nth-byte ( x n -- b ) -8 * shift mask-byte ; inline
 
-: >le ( x n -- byte-array ) [ nth-byte ] with B{ } map-as ;
+: >le ( x n -- byte-array ) iota [ nth-byte ] with B{ } map-as ;
 : >be ( x n -- byte-array ) >le dup reverse-here ;
 
 : d>w/w ( d -- w1 w2 )
index 17dbcf5c3cbb8b7a87e8df8d00cafe7de0801e07..92a3495ba8672ef3b5ad41cf08d9bc81d2753f91 100755 (executable)
@@ -701,7 +701,7 @@ PRIVATE>
     3tri ;
 
 : reverse-here ( seq -- )
-    [ length 2/ ] [ length ] [ ] tri
+    [ length 2/ iota ] [ length ] [ ] tri
     [ [ over - 1 - ] dip exchange-unsafe ] 2curry each ;
 
 : reverse ( seq -- newseq )
@@ -805,14 +805,14 @@ PRIVATE>
 <PRIVATE
 
 : (start) ( subseq seq n -- subseq seq ? )
-    pick length [
+    pick length iota [
         [ 3dup ] dip [ + swap nth-unsafe ] keep rot nth-unsafe =
     ] all? nip ; inline
 
 PRIVATE>
 
 : start* ( subseq seq n -- i )
-    pick length pick length swap - 1 +
+    pick length pick length swap - 1 + iota
     [ (start) ] find-from
     swap [ 3drop ] dip ;