From c75777b7a208d0ded033e15838ae2e9d42252cc4 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 6 Dec 2008 18:58:05 -0600 Subject: [PATCH] swap ... 3append -> surround in extra --- extra/combinators/lib/lib-tests.factor | 2 +- extra/html/parser/utils/utils.factor | 4 ++-- extra/multi-methods/multi-methods.factor | 2 +- extra/parser-combinators/simple/simple-docs.factor | 4 ++-- extra/raptor/raptor.factor | 4 ++-- extra/webapps/wiki/wiki.factor | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/extra/combinators/lib/lib-tests.factor b/extra/combinators/lib/lib-tests.factor index 838bb08b92..9489798b9b 100755 --- a/extra/combinators/lib/lib-tests.factor +++ b/extra/combinators/lib/lib-tests.factor @@ -16,7 +16,7 @@ IN: combinators.lib.tests [ { "foo" "xbarx" } ] [ - { "oof" "bar" } { [ reverse ] [ "x" swap "x" 3append ] } parallel-call + { "oof" "bar" } { [ reverse ] [ "x" dup surround ] } parallel-call ] unit-test { 1 1 } [ diff --git a/extra/html/parser/utils/utils.factor b/extra/html/parser/utils/utils.factor index 976a5ba91f..2f414d2aa5 100644 --- a/extra/html/parser/utils/utils.factor +++ b/extra/html/parser/utils/utils.factor @@ -16,10 +16,10 @@ IN: html.parser.utils [ ?head drop ] [ ?tail drop ] bi ; : single-quote ( str -- newstr ) - "'" swap "'" 3append ; + "'" dup surround ; : double-quote ( str -- newstr ) - "\"" swap "\"" 3append ; + "\"" dup surround ; : quote ( str -- newstr ) CHAR: ' over member? diff --git a/extra/multi-methods/multi-methods.factor b/extra/multi-methods/multi-methods.factor index 682abf3a5d..14062b15db 100755 --- a/extra/multi-methods/multi-methods.factor +++ b/extra/multi-methods/multi-methods.factor @@ -102,7 +102,7 @@ SYMBOL: total { 0 [ [ dup ] ] } { 1 [ [ over ] ] } { 2 [ [ pick ] ] } - [ 1- picker [ >r ] swap [ r> swap ] 3append ] + [ 1- picker [ >r ] [ r> swap ] surround ] } case ; : (multi-predicate) ( class picker -- quot ) diff --git a/extra/parser-combinators/simple/simple-docs.factor b/extra/parser-combinators/simple/simple-docs.factor index fdf32bddb1..be6c01aab8 100755 --- a/extra/parser-combinators/simple/simple-docs.factor +++ b/extra/parser-combinators/simple/simple-docs.factor @@ -41,7 +41,7 @@ HELP: 'bold' "commonly used in markup languages to indicate bold " "faced text." } { $example "USING: parser-combinators parser-combinators.simple prettyprint ;" "\"*foo*\" 'bold' parse-1 ." "\"foo\"" } -{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"*foo*\" 'bold' [ \"\" swap \"\" 3append ] <@ parse-1 ." "\"foo\"" } ; +{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"*foo*\" 'bold' [ \"\" \"\" surround ] <@ parse-1 ." "\"foo\"" } ; HELP: 'italic' { $values @@ -53,7 +53,7 @@ HELP: 'italic' "faced text." } { $examples { $example "USING: parser-combinators parser-combinators.simple prettyprint ;" "\"_foo_\" 'italic' parse-1 ." "\"foo\"" } -{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"_foo_\" 'italic' [ \"\" swap \"\" 3append ] <@ parse-1 ." "\"foo\"" } } ; +{ $example "USING: kernel parser-combinators parser-combinators.simple prettyprint sequences ;" "\"_foo_\" 'italic' [ \"\" \"\" surround ] <@ parse-1 ." "\"foo\"" } } ; HELP: comma-list { $values { "element" "a parser object" } { "parser" "a parser object" } } diff --git a/extra/raptor/raptor.factor b/extra/raptor/raptor.factor index 933275e5bf..c0605fe837 100755 --- a/extra/raptor/raptor.factor +++ b/extra/raptor/raptor.factor @@ -32,8 +32,8 @@ SYMBOL: networking-hook ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: start-service ( name -- ) "/etc/init.d/" swap " start" 3append system drop ; -: stop-service ( name -- ) "/etc/init.d/" swap " stop" 3append system drop ; +: start-service ( name -- ) "/etc/init.d/" " start" surround system drop ; +: stop-service ( name -- ) "/etc/init.d/" " stop" surround system drop ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/extra/webapps/wiki/wiki.factor b/extra/webapps/wiki/wiki.factor index b78dc25d79..f2c0600ed5 100644 --- a/extra/webapps/wiki/wiki.factor +++ b/extra/webapps/wiki/wiki.factor @@ -230,7 +230,7 @@ M: revision feed-entry-url id>> revision-url ; [ list-revisions ] >>entries ; : rollback-description ( description -- description' ) - [ "Rollback of '" swap "'" 3append ] [ "Rollback" ] if* ; + [ "Rollback of '" "'" surround ] [ "Rollback" ] if* ; : ( -- action )