]> gitweb.factorcode.org Git - factor.git/commitdiff
rename some words to x>sequence and sequence>x.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 24 Jul 2012 04:28:38 +0000 (21:28 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 24 Jul 2012 04:28:38 +0000 (21:28 -0700)
basis/bitstreams/bitstreams.factor
basis/bootstrap/image/image.factor
basis/checksums/sha/sha.factor
basis/regexp/classes/classes.factor
basis/xml/data/data.factor
extra/game/models/collada/collada-docs.factor
extra/game/models/collada/collada.factor
extra/id3/id3-tests.factor
extra/id3/id3.factor
extra/images/bitmap/bitmap.factor

index 12f75dc6ee1ff113cc022797eb4668124523e48c..040b95e0d6d9878397f1c76891e2fcc2ddc82a7d 100644 (file)
@@ -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 <msb0-bit-reader> '[
         drop n _ read
index 8ade58998f112543aeb605c1ef41c6adf530f2ac..f648e691bef43130b9818e9c5617e424267598df 100755 (executable)
@@ -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 ]
index 822e4f94e66e5e3039665d5c62d1f2adef7a1170..c71cd864f2cf056e9d9429ea5a02c71493bdbc2f 100644 (file)
@@ -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
index 0f0128a5a58f9dbdb7cdf62051ebe4e911787f27..d9eb05acc351a314a9af1865cdbe67aea64b1602 100644 (file)
@@ -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 ;
 
 : <and-class> ( 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 ;
 
 : <or-class> ( seq -- class )
     dup or-class flatten partition-classes
index 3a9db764ffcaf2a4ea022a6d06fb5b49c9798d31..8c6c11cd44bfce113987ed7798fc70878df82b9c 100644 (file)
@@ -194,7 +194,7 @@ CONSULT: name xml body>> ;
     [ [ prolog>> ] [ before>> ] [ after>> ] tri ] dip
     swap <xml> ;
 
-: 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
index acd180a9066840d50b644b05c3cfc714691f8ace..0936d864ab2bffe5b9a4f01d267ecc293a684e68 100644 (file)
@@ -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." } ;
 
index 4759dc6fe4d63b0bd3b678df05ff937dc2554173..2d3192279c490b77d31c8967c2a4dc7285dfaf8f 100644 (file)
@@ -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 ;
index bc3a387fd0cc4aa4b5e0bee8593de40527c5788a..d29609f19a14fa7c0a37daced89b0b2dc4e78dd9 100644 (file)
@@ -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
index f1ee2210612462fba15c6d38161648dba625b8ef..681ded4d0eca0706bf900383b067117e6e5d3f6f 100644 (file)
@@ -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
     [ <frame> ] 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 <slice> >array >>version ]
         [ [ 5 ] dip nth >>flags ]
-        [ [ 6 10 ] dip <slice> seq>synchsafe >>size ]
+        [ [ 6 10 ] dip <slice> sequence>synchsafe >>size ]
     } cleave ;
 
 : merge-frames ( id3 assoc -- id3 )
index 92b81fc0519f62bb5e713f6eb5b7ac3a76d9bfe3..01c9ba00a9575a27a15fb5bb5447a6a1d66789a8 100644 (file)
@@ -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 ;