diff --git a/basis/bitstreams/bitstreams.factor b/basis/bitstreams/bitstreams.factor index 12f75dc6ee..040b95e0d6 100644 --- a/basis/bitstreams/bitstreams.factor +++ b/basis/bitstreams/bitstreams.factor @@ -170,7 +170,7 @@ M: msb0-bit-reader peek ( n bs -- bits ) \ be> \ subseq>bits-be (peek) ; ] unless writer bytes>> ; -:: byte-array-n>seq ( byte-array n -- seq ) +:: byte-array-n>sequence ( byte-array n -- seq ) byte-array length 8 * n / iota byte-array '[ drop n _ read diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index 8ade58998f..f648e691be 100755 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -277,14 +277,14 @@ GENERIC: ' ( obj -- ptr ) : bignum-radix ( -- n ) bignum-bits 2^ 1 - ; -: bignum>seq ( n -- seq ) +: bignum>sequence ( n -- seq ) #! n is positive or zero. [ dup 0 > ] [ [ bignum-bits neg shift ] [ bignum-radix bitand ] bi ] produce nip ; : emit-bignum ( n -- ) - dup dup 0 < [ neg ] when bignum>seq + dup dup 0 < [ neg ] when bignum>sequence [ nip length 1 + emit-fixnum ] [ drop 0 < 1 0 ? emit ] [ nip emit-seq ] diff --git a/basis/checksums/sha/sha.factor b/basis/checksums/sha/sha.factor index 822e4f94e6..c71cd864f2 100644 --- a/basis/checksums/sha/sha.factor +++ b/basis/checksums/sha/sha.factor @@ -308,17 +308,17 @@ M: sha2-short checksum-block [ prepare-message-schedule ] [ [ block-size>> ] [ H>> clone ] [ ] tri process-chunk ] bi ; -: seq>byte-array ( seq n -- string ) +: sequence>byte-array ( seq n -- string ) '[ _ >be ] map B{ } concat-as ; : sha1>checksum ( sha2 -- bytes ) - H>> 4 seq>byte-array ; + H>> 4 sequence>byte-array ; : sha-224>checksum ( sha2 -- bytes ) - H>> 7 head 4 seq>byte-array ; + H>> 7 head 4 sequence>byte-array ; : sha-256>checksum ( sha2 -- bytes ) - H>> 4 seq>byte-array ; + H>> 4 sequence>byte-array ; : pad-last-short-block ( state -- ) [ bytes>> t ] [ bytes-read>> pad-last-block ] [ ] tri diff --git a/basis/regexp/classes/classes.factor b/basis/regexp/classes/classes.factor index 0f0128a5a5..d9eb05acc3 100644 --- a/basis/regexp/classes/classes.factor +++ b/basis/regexp/classes/classes.factor @@ -148,7 +148,7 @@ DEFER: substitute : flatten ( seq class -- newseq ) '[ dup _ instance? [ seq>> ] [ 1array ] if ] map concat ; inline -:: seq>instance ( seq empty class -- instance ) +:: sequence>instance ( seq empty class -- instance ) seq length { { 0 [ empty ] } { 1 [ seq first ] } @@ -167,7 +167,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; [ or-class? ] partition class-partition boa ; -: class-partition>seq ( class-partition -- seq ) +: class-partition>sequence ( class-partition -- seq ) [ { [ integers>> ] @@ -182,7 +182,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; : repartition ( partition -- partition' ) ! This could be made more efficient; only and and or are effected - class-partition>seq partition-classes ; + class-partition>sequence partition-classes ; : filter-not-integers ( partition -- partition' ) dup @@ -205,7 +205,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; [ t swap remove ] change-other dup contradiction? [ drop f ] - [ filter-not-integers class-partition>seq members t and-class seq>instance ] if ; + [ filter-not-integers class-partition>sequence members t and-class sequence>instance ] if ; : ( seq -- class ) dup and-class flatten partition-classes @@ -236,7 +236,7 @@ TUPLE: class-partition integers not-integers simples not-simples and or other ; [ f swap remove ] change-other dup tautology? [ drop t ] - [ filter-integers class-partition>seq members f or-class seq>instance ] if ; + [ filter-integers class-partition>sequence members f or-class sequence>instance ] if ; : ( seq -- class ) dup or-class flatten partition-classes diff --git a/basis/xml/data/data.factor b/basis/xml/data/data.factor index 3a9db764ff..8c6c11cd44 100644 --- a/basis/xml/data/data.factor +++ b/basis/xml/data/data.factor @@ -194,7 +194,7 @@ CONSULT: name xml body>> ; [ [ prolog>> ] [ before>> ] [ after>> ] tri ] dip swap ; -: seq>xml ( xml seq -- newxml ) +: sequence>xml ( xml seq -- newxml ) over body>> like tag>xml ; PRIVATE> @@ -203,7 +203,7 @@ M: xml clone M: xml like swap dup xml? [ nip ] [ - dup tag? [ tag>xml ] [ seq>xml ] if + dup tag? [ tag>xml ] [ sequence>xml ] if ] if ; ! tag with children=f is contained diff --git a/extra/game/models/collada/collada-docs.factor b/extra/game/models/collada/collada-docs.factor index acd180a906..0936d864ab 100644 --- a/extra/game/models/collada/collada-docs.factor +++ b/extra/game/models/collada/collada-docs.factor @@ -32,7 +32,7 @@ HELP: >y-up-axis! { $values { "seq" sequence } { "from-axis" rh-up } } { $description "Destructively swizzles the first three elements of the input sequence to a right-handed 3D coordinate system where Y is up and returns the modified sequence." } ; -HELP: source>seq +HELP: source>sequence { $values { "source-tag" tag } { "up-axis" rh-up } { "scale" number } { "sequence" sequence } } { $description "Convert the " { $emphasis "float_array" } " in a " { $emphasis "source tag" } " to a sequence of number sequences according to the element stride. The values are scaled according to " { $emphasis "scale" } " and swizzled from " { $emphasis "up-axis" } " so that the Y coordinate points up." } ; diff --git a/extra/game/models/collada/collada.factor b/extra/game/models/collada/collada.factor index 4759dc6fe4..2d3192279c 100644 --- a/extra/game/models/collada/collada.factor +++ b/extra/game/models/collada/collada.factor @@ -67,7 +67,7 @@ M: z-up >y-up-axis! [ 0 swap set-nth ] tri ] bi ; -: source>seq ( source-tag up-axis scale -- sequence ) +: source>sequence ( source-tag up-axis scale -- sequence ) rot [ "float_array" x/ xt string>numbers [ * ] with map ] [ nip "technique_common" x/ "accessor" x/ "stride" x@ string>number ] 2bi @@ -76,7 +76,7 @@ M: z-up >y-up-axis! : source>pair ( source-tag -- pair ) [ "id" x@ ] - [ up-axis get unit-ratio get source>seq ] bi 2array ; + [ up-axis get unit-ratio get source>sequence ] bi 2array ; : mesh>sources ( mesh-tag -- hashtable ) "source" [ source>pair ] x* >hashtable ; diff --git a/extra/id3/id3-tests.factor b/extra/id3/id3-tests.factor index bc3a387fd0..d29609f19a 100644 --- a/extra/id3/id3-tests.factor +++ b/extra/id3/id3-tests.factor @@ -32,7 +32,7 @@ IN: id3.tests "Classical" ] [ "vocab:id3/tests/blah2.mp3" mp3>id3 id3-params ] unit-test -[ +[ "Stormy Weather" "Frank Sinatra" "Night and Day Frank Sinatra" @@ -43,4 +43,4 @@ IN: id3.tests [ t ] -[ 10000 iota [ synchsafe>seq seq>synchsafe ] map [ < ] monotonic? ] unit-test +[ 10000 iota [ synchsafe>sequence sequence>synchsafe ] map [ < ] monotonic? ] unit-test diff --git a/extra/id3/id3.factor b/extra/id3/id3.factor index f1ee221061..681ded4d0e 100644 --- a/extra/id3/id3.factor +++ b/extra/id3/id3.factor @@ -101,10 +101,10 @@ CONSTANT: id3v1+-length 227 } cleave ] output>array sift ; -: seq>synchsafe ( seq -- n ) +: sequence>synchsafe ( seq -- n ) 0 [ [ 7 shift ] dip bitor ] reduce ; -: synchsafe>seq ( n -- seq ) +: synchsafe>sequence ( n -- seq ) dup 1 + log2 1 + 7 / ceiling [ [ -7 shift ] keep 0x7f bitand ] replicate nip reverse ; @@ -126,7 +126,7 @@ CONSTANT: id3v1+-length 227 [ ] dip { [ 4 head-slice decode-text >>tag ] - [ [ 4 8 ] dip subseq seq>synchsafe >>size ] + [ [ 4 8 ] dip subseq sequence>synchsafe >>size ] [ [ 8 10 ] dip subseq >byte-array >>flags ] [ read-frame-data decode-text >>data ] } cleave ; @@ -149,7 +149,7 @@ CONSTANT: id3v1+-length 227 { [ [ 3 5 ] dip >array >>version ] [ [ 5 ] dip nth >>flags ] - [ [ 6 10 ] dip seq>synchsafe >>size ] + [ [ 6 10 ] dip sequence>synchsafe >>size ] } cleave ; : merge-frames ( id3 assoc -- id3 ) diff --git a/extra/images/bitmap/bitmap.factor b/extra/images/bitmap/bitmap.factor index 92b81fc051..01c9ba00a9 100644 --- a/extra/images/bitmap/bitmap.factor +++ b/extra/images/bitmap/bitmap.factor @@ -290,8 +290,8 @@ ERROR: bmp-not-supported n ; color-index>> ] } { 8 [ color-lookup ] } - { 4 [ [ 4 b:byte-array-n>seq ] change-color-index color-lookup ] } - { 1 [ [ 1 b:byte-array-n>seq ] change-color-index color-lookup ] } + { 4 [ [ 4 b:byte-array-n>sequence ] change-color-index color-lookup ] } + { 1 [ [ 1 b:byte-array-n>sequence ] change-color-index color-lookup ] } [ bmp-not-supported ] } case >byte-array ;