]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: swap over is `tuck`
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 31 Jul 2022 17:10:17 +0000 (12:10 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 31 Jul 2022 18:26:02 +0000 (13:26 -0500)
basis/game/input/gtk/gtk.factor
basis/peg/peg.factor
extra/http2/hpack/hpack.factor

index 56f6be182b85523cfc7bfe35cc2a72ecf442d72f..93b486087409d3285b8a7b44dd1c40e1360e6246 100644 (file)
@@ -22,7 +22,7 @@ TUPLE: linux-controller < controller path meta state thread fd buttons quit? ;
         dup meta>> "path" of binary <file-reader> handle>> fd>> >>fd
         H{ } clone >>state
         dup meta>> "capabilities" of EV_KEY of keys seq>explode-positions >>buttons ; inline
-        ! swap over state>> '[ _ _ read-events ] in-thread ;
+        ! tuck state>> '[ _ _ read-events ] in-thread ;
 
 M: linux-controller dispose* fd>> close drop ;
 
index 5168230588fe5c5350e7178f47eed9c219cfcbd5..a73df1c004267a7959750894f17a631ea90b3604 100644 (file)
@@ -266,7 +266,7 @@ GENERIC: (compile) ( peg -- quot )
     pos get apply-rule process-parser-result ;
 
 : preset-parser-word ( parser -- word parser )
-    gensym swap over >>compiled ;
+    gensym tuck >>compiled ;
 
 : define-parser-word ( word parser -- )
     ! Return the body of the word that is the compiled version
index b5c87fd8890a248ef36029a9ef2dea186afb09ef..328b56b1d02aabc3eb2b069f49580bae68189608 100644 (file)
@@ -154,7 +154,7 @@ CONSTANT: static-table {
 : encode-integer ( first-byte int prefix-length -- bytes )
     2^ 1 - 2dup < 
     [ drop bitor 1byte-array ]
-    [ swap over [ bitor 1byte-array >byte-vector ] [ - ] 2bi* 
+    [ tuck [ bitor 1byte-array >byte-vector ] [ - ] 2bi*
       [ dup 128 >= ] [ [ 128 mod 128 + over push ] [ 128 /i ] bi ]
       while over push >byte-array
     ] if ;