]> gitweb.factorcode.org Git - factor.git/commitdiff
use surround/glue instead of 3append
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 12 Nov 2009 09:01:09 +0000 (03:01 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 12 Nov 2009 09:01:09 +0000 (03:01 -0600)
basis/prettyprint/backend/backend.factor
basis/xml/entities/html/html.factor
core/bootstrap/primitives.factor
core/io/pathnames/pathnames.factor
extra/irc/client/internals/internals.factor
extra/mason/platform/platform.factor

index 0ba1d38ae62054b0f3522f1eab5030a5595daa8c..04617a6c672cfeed553a89cbcaede6f22bb91e0a 100644 (file)
@@ -116,8 +116,7 @@ M: pathname pprint*
 : check-recursion ( obj quot -- )
     nesting-limit? [
         drop
-        "~" over class name>> "~" 3append
-        swap present-text
+        [ class name>> "~" dup surround ] keep present-text 
     ] [
         over recursion-check get member-eq? [
             drop "~circularity~" swap present-text
@@ -175,7 +174,7 @@ M: tuple pprint*
 : pprint-elements ( seq -- )
     do-length-limit
     [ [ pprint* ] each ] dip
-    [ "~" swap number>string " more~" 3append text ] when* ;
+    [ number>string "~" " more~" surround text ] when* ;
 
 M: quotation pprint-delims drop \ [ \ ] ;
 M: curry pprint-delims drop \ [ \ ] ;
index 04c0b66063f311d8745b3f0b18823d178817c06d..fd8480307a6626d6610a9e1045d8eb21a9047ffe 100644 (file)
@@ -11,8 +11,8 @@ VALUE: html-entities
 
 : get-html ( -- table )
     { "lat1" "special" "symbol" } [
-        "vocab:xml/entities/html/xhtml-"
-        swap ".ent" 3append read-entities-file
+        "vocab:xml/entities/html/xhtml-" ".ent" surround
+        read-entities-file
     ] map first3 assoc-union assoc-union ;
 
 get-html to: html-entities
index 8b4c0a4a366ca09c16828547fb3c164e059cd4c1..97c66530a003cdcf749c25667520efbbd9c5a726 100644 (file)
@@ -16,7 +16,7 @@ H{ } clone sub-primitives set
 
 "vocab:bootstrap/syntax.factor" parse-file
 
-"vocab:cpu/" architecture get {
+architecture get {
     { "x86.32" "x86/32" }
     { "winnt-x86.64" "x86/64/winnt" }
     { "unix-x86.64" "x86/64/unix" }
@@ -24,7 +24,7 @@ H{ } clone sub-primitives set
     { "macosx-ppc" "ppc/macosx" }
     { "arm" "arm" }
 } ?at [ "Bad architecture: " prepend throw ] unless
-"/bootstrap.factor" 3append parse-file
+"vocab:cpu/" "/bootstrap.factor" surround parse-file
 
 "vocab:bootstrap/layouts/layouts.factor" parse-file
 
index 25eefd1105bef391bcefa27cfb1df829d37a1732..b307128efb2287bbd60d9a36ffa7866aac42ab9b 100644 (file)
@@ -102,8 +102,8 @@ PRIVATE>
             [ 2 head ] dip append
         ] }
         [
-            [ trim-tail-separators "/" ] dip
-            trim-head-separators 3append
+            [ trim-tail-separators ]
+            [ trim-head-separators ] bi* "/" glue
         ]
     } cond ;
 
index ef1695f5634ed6a588a645f4c59dd8a2aa53a8c9..f2030e87b018bab93d3c9059668ee4638e8eaa84 100644 (file)
@@ -26,7 +26,7 @@ IN: irc.client.internals
     irc> [ connect>> ] [ reconnect-attempts>> ] bi do-connect ;
 
 : /JOIN ( channel password -- )
-    [ " :" swap 3append ] when* "JOIN " prepend irc-print ;
+    [ " :" glue ] when* "JOIN " prepend irc-print ;
 
 : try-connect ( -- stream/f )
     irc> profile>> [ server>> ] [ port>> ] bi /CONNECT ;
index d6be8654c5473d313eb4343e476ba2ce16fc0835..2a33c5240b572c25572daf0f31fdd0822e4d30cb 100644 (file)
@@ -17,4 +17,4 @@ IN: mason.platform
     target-os get target-cpu get arch ;
 
 : boot-image-name ( -- string )
-    "boot." boot-image-arch ".image" 3append ;
+    boot-image-arch "boot." ".image" surround ;