: 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
: 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 \ [ \ ] ;
: 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
"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" }
{ "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
[ 2 head ] dip append
] }
[
- [ trim-tail-separators "/" ] dip
- trim-head-separators 3append
+ [ trim-tail-separators ]
+ [ trim-head-separators ] bi* "/" glue
]
} cond ;
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 ;
target-os get target-cpu get arch ;
: boot-image-name ( -- string )
- "boot." boot-image-arch ".image" 3append ;
+ boot-image-arch "boot." ".image" surround ;