use itoa in more places

db4
Doug Coleman 2009-08-02 18:18:31 -05:00
parent a551bdb2c8
commit eb61ffc56d
5 changed files with 7 additions and 7 deletions

View 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 ;

View File

@ -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

View 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

View 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 )

View File

@ -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 ;