]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: words -> split-words, lines -> split-lines, fix errors
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 22:20:00 +0000 (16:20 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Dec 2021 22:20:00 +0000 (16:20 -0600)
125 files changed:
basis/alien/libraries/finder/freebsd/freebsd.factor
basis/bootstrap/stage2.factor
basis/calendar/format/format.factor
basis/compiler/cfg/debugger/debugger.factor
basis/compiler/cfg/instructions/syntax/syntax-docs.factor
basis/db/postgresql/lib/lib.factor
basis/db/sqlite/sqlite-tests.factor
basis/documents/documents.factor
basis/escape-strings/escape-strings.factor
basis/eval/eval.factor
basis/farkup/farkup.factor
basis/formatting/formatting.factor
basis/ftp/client/listing-parser/listing-parser.factor
basis/ftp/server/server.factor
basis/furnace/actions/actions.factor
basis/furnace/chloe-tags/chloe-tags.factor
basis/gobject-introspection/gobject-introspection.factor
basis/help/html/html.factor
basis/help/markup/markup.factor
basis/help/search/search.factor
basis/help/syntax/syntax.factor
basis/help/vocabs/vocabs.factor
basis/html/components/components.factor
basis/html/templates/fhtml/fhtml.factor
basis/http/client/client-tests.factor
basis/http/http-tests.factor
basis/http/http.factor
basis/http/server/requests/requests-tests.factor
basis/http/server/server-tests.factor
basis/io/encodings/gb18030/gb18030.factor
basis/io/encodings/iana/iana.factor
basis/io/launcher/windows/windows.factor
basis/logging/analysis/analysis.factor
basis/logging/logging.factor
basis/logging/parser/parser.factor
basis/math/primes/factors/factors.factor
basis/mime/multipart/multipart.factor
basis/opengl/capabilities/capabilities.factor
basis/peg/ebnf/ebnf.factor
basis/present/present.factor
basis/quoted-printable/quoted-printable-tests.factor
basis/resolv-conf/resolv-conf.factor
basis/strings/tables/tables.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/config/editor/editor.factor
basis/tools/files/files.factor
basis/tools/ps/macosx/macosx.factor
basis/tools/scaffold/scaffold.factor
basis/ui/gadgets/editors/editors.factor
basis/ui/gadgets/labels/labels.factor
basis/ui/gadgets/panes/panes.factor
basis/ui/gadgets/tables/tables.factor
basis/ui/tools/listener/listener.factor
basis/unicode/collation/collation-tests.factor
basis/unix/linux/proc/proc.factor
basis/vocabs/platforms/platforms.factor
basis/wrap/strings/strings.factor
basis/xmode/code2html/code2html-tests.factor
basis/xmode/highlight/highlight.factor
core/classes/intersection/intersection.factor
core/classes/mixin/mixin-tests.factor
core/classes/tuple/parser/parser-tests.factor
core/classes/tuple/tuple-tests.factor
core/classes/union/union.factor
core/parser/parser-tests.factor
core/sequences/sequences-tests.factor
core/splitting/splitting-docs.factor
core/splitting/splitting-tests.factor
core/splitting/splitting.factor
extra/99-bottles/99-bottles.factor
extra/benchmark/backtrack/backtrack.factor
extra/benchmark/chameneos-redux/chameneos-redux.factor
extra/benchmark/fasta/fasta.factor
extra/benchmark/unicode/unicode.factor
extra/brainfuck/brainfuck-tests.factor
extra/bunny/model/model.factor
extra/compiler/cfg/graphviz/graphviz.factor
extra/compiler/cfg/gvn/testing/testing.factor
extra/cpu/8080/emulator/emulator.factor
extra/crontab/crontab.factor
extra/cuda/devices/devices.factor
extra/euler/b-rep/io/obj/obj.factor
extra/gemini/cli/cli.factor
extra/gemini/gemini.factor
extra/geo-ip/geo-ip.factor
extra/git/git.factor
extra/gopher/gopher.factor
extra/gpu/shaders/shaders.factor
extra/imap/imap.factor
extra/irc/messages/base/base.factor
extra/irc/messages/messages.factor
extra/irc/messages/parser/parser.factor
extra/lcd/lcd.factor
extra/literate/literate.factor
extra/machine-learning/data-sets/data-sets.factor
extra/mason/git/git.factor
extra/mason/report/report.factor
extra/math/text/french/french.factor
extra/metar/metar.factor
extra/modern/html/html.factor
extra/morse/morse.factor
extra/pdf/layout/layout.factor
extra/pdf/pdf.factor
extra/pdf/streams/streams.factor
extra/pdf/values/values.factor
extra/poker/poker.factor
extra/pop3/pop3.factor
extra/project-euler/067/067.factor
extra/quiz/quiz.factor
extra/robots/robots.factor
extra/rosetta-code/amb/amb.factor
extra/rosetta-code/sierpinski-triangle/sierpinski-triangle.factor
extra/rosetta-code/text-processing/max-licenses/max-licenses.factor
extra/rpn/rpn.factor
extra/smalltalk/printer/printer.factor
extra/subrip-subtitles/subrip-subtitles.factor
extra/text-to-pdf/text-to-pdf.factor
extra/text-to-speech/text-to-speech.factor
extra/tools/echo/echo.factor
extra/txon/txon.factor
extra/webapps/mason/version/binary/binary.factor
extra/webapps/wiki/wiki.factor
extra/wikipedia/wikipedia.factor
extra/wolfram-alpha/wolfram-alpha.factor
extra/zeromq/examples/wuclient.factor

index 087d05c814e5b57b4fe1855b8ba85834c71a2638..a47f16daab916691ad7e8352ec079cc9ff9965ec 100644 (file)
@@ -7,7 +7,7 @@ IN: alien.libraries.finder.freebsd
 
 : parse-ldconfig-lines ( string -- triple )
     [ ":-" split1 [ drop ] dip
-    "=>" split1 [ [ blank? ] trim ] bi@
+    "=>" split1 [ [ unicode:blank? ] trim ] bi@
       2array
    ] map ;
 
index 5ab2776d78971063e1155ca04e67281700f626fb..db8f335eea66616296a04e8a8849f32cdc97f2fe 100644 (file)
@@ -29,7 +29,7 @@ SYMBOL: bootstrap-time
     "bootstrap." prepend require ;
 
 : load-components ( -- )
-    "include" "exclude" [ get-global words harvest ] bi@ diff
+    "include" "exclude" [ get-global split-words harvest ] bi@ diff
     [ load-component ] each ;
 
 : print-time ( us -- )
index f5a57d7f2ad622d1d2950a95711753fe0764a1c0..5723594a6609f9bef493c4109521abb0939a06b8 100644 (file)
@@ -73,7 +73,7 @@ M: timestamp day.
     [ number>string ] [ month-name ] bi* swap " " glue 20 center. ;
 
 : days-header. ( -- )
-    day-abbreviations2 unwords print ;
+    day-abbreviations2 join-words print ;
 
 : days. ( year month -- )
     [ 1 (day-of-week) dup [ "   " write ] times ]
@@ -94,7 +94,7 @@ M: integer year.
         [
             [ month-name 20 center. ]
             [ days-header. days. nl nl ] bi
-        ] with-string-writer lines
+        ] with-string-writer split-lines
     ] with map 3 <groups>
     [ first3 [ "%-20s  %-20s  %-20s\n" printf ] 3each ] each ;
 
@@ -238,7 +238,7 @@ M: integer elapsed-time
             [ first [ /mod ] [ dup ] if* ] [ second ] bi swap
             dup 0 > [ number>string prepend , ] [ 2drop ] if
         ] each drop
-    ] { } make [ "0s" ] [ reverse unwords ] if-empty ;
+    ] { } make [ "0s" ] [ reverse join-words ] if-empty ;
 
 M: real elapsed-time
     >integer elapsed-time ;
index debb2489964aa8884a5be0d37abfd42400d661c1..a252bab32f363c3744838fd766205cd78c88ddb9 100644 (file)
@@ -54,7 +54,7 @@ M: ##phi insn.
 M: insn insn. ( insn -- )
     tuple>array unclip-last insn-number. [
         dup string? [ ] [ unparse ] if
-    ] map unwords write nl ;
+    ] map join-words write nl ;
 
 : block-header. ( bb -- )
     [ number>> ] [ kill-block?>> "(k)" "" ? ] bi
index 990e1e05ba4f94c30a33c2a2181b11b13a1193e0..5023514dec0b59077f6b777401fd797030ba42f6 100644 (file)
@@ -4,7 +4,7 @@ IN: compiler.cfg.instructions.syntax
 <<
 STRING: parse-insn-slot-specs-code
 USING: compiler.cfg.instructions.syntax prettyprint splitting ;
-"use: src/int-rep temp: temp/int-rep" words parse-insn-slot-specs .
+"use: src/int-rep temp: temp/int-rep" split-words parse-insn-slot-specs .
 ;
 
 STRING: parse-insn-slot-specs-result
index 10db939b2a0f121457253c04474ebad5bc06635c..f1c5d1e47c3093ed86cad965703aa07f0b3227b1 100644 (file)
@@ -21,7 +21,7 @@ IN: db.postgresql.lib
 
 : (postgresql-error-message) ( handle -- str )
     PQerrorMessage
-    "\n" split [ [ blank? ] trim ] map unlines ;
+    "\n" split [ [ blank? ] trim ] map join-lines ;
 
 : postgresql-error-message ( -- str )
     db-connection get handle>> (postgresql-error-message) ;
index c339e641aa369c8f1d9d58a8911f0f87729a0d20..7a2dc8e2326a12bbc3ac61efce650b9995ac0b5e 100644 (file)
@@ -5,7 +5,7 @@ math.parser namespaces sequences sorting splitting tools.test ;
 IN: db.sqlite.tests
 
 : normalize ( str -- str' )
-    " \n" split harvest unwords ;
+    " \n" split harvest join-words ;
 
 ! delete-trigger-restrict
 ${
index a8d553e86074cbf1c1039c0319388ae546fee54a..5e8ab0c99fc52015b4aee100d3b678d3064146e4 100644 (file)
@@ -108,8 +108,8 @@ CONSTANT: doc-start { 0 0 }
 : with-undo ( ..a document quot: ( ..a document -- ..b ) -- ..b )
     [ t >>inside-undo? ] dip keep f >>inside-undo? drop ; inline
 
-: split-lines ( str -- seq )
-    [ lines ] keep ?last
+: ?split-lines ( str -- seq )
+    [ split-lines ] keep ?last
     [ "\r\n" member? ] [ t ] if*
     [ "" suffix ] when ;
 
@@ -117,7 +117,7 @@ PRIVATE>
 
 :: doc-range ( from to document -- string )
     from to [ [ from to ] dip document (doc-range) ] map-lines
-    unlines ;
+    join-lines ;
 
 : add-undo ( edit document -- )
     dup inside-undo?>> [ 2drop ] [
@@ -127,7 +127,7 @@ PRIVATE>
 
 :: set-doc-range ( string from to document -- )
     from to = string empty? and [
-        string split-lines :> new-lines
+        string ?split-lines :> new-lines
         new-lines from text+loc :> new-to
         from to document doc-range :> old-string
         old-string string from to new-to <edit> document add-undo
@@ -137,7 +137,7 @@ PRIVATE>
 
 :: set-doc-range* ( string from to document -- )
     from to = string empty? and [
-        string split-lines :> new-lines
+        string ?split-lines :> new-lines
         new-lines from text+loc :> new-to
         new-lines from to document [ (set-doc-range) ] models:change-model
         new-to document update-locs
index 136e4992b24b330b60fefa327c81c06ee7aee275..6686b9c1bf9d8ec1c4a4b8c4e118ce7ae7a2089d 100644 (file)
@@ -91,4 +91,4 @@ M: sequence sha1-escape-strings ( seq -- strs )
     [ sha1-escape-string ] { } map-as ;
 
 M: string sha1-escape-strings ( str -- strs )
-    lines sha1-escape-strings ;
\ No newline at end of file
+    split-lines sha1-escape-strings ;
\ No newline at end of file
index eb8a23e70e6414f26d5c253f3ec3c587caf91c54..cdf249349e1f4476138844a334590d16ce26c87a 100644 (file)
@@ -6,7 +6,7 @@ parser.notes splitting ;
 IN: eval
 
 : parse-string ( str -- quot )
-    [ lines parse-lines ] with-compilation-unit ;
+    [ split-lines parse-lines ] with-compilation-unit ;
 
 : (eval) ( str effect -- )
     [ parse-string ] dip call-effect ; inline
index 879fab36ed0cd5242cf9066eb7db9eb2fec7786b..897f454e181b6e3f9571f1a57051b928fc78b7fd 100644 (file)
@@ -108,7 +108,7 @@ DEFER: (parse-paragraph)
     [ cut-slice ] [ f ] if* swap ;
 
 :: (take-until) ( state delimiter accum -- string/f state' )
-    state empty? [ accum unlines f ] [
+    state empty? [ accum join-lines f ] [
         state unclip-slice :> ( rest first )
         first delimiter split1 :> ( before after )
         before accum push
@@ -203,7 +203,7 @@ DEFER: (parse-paragraph)
     } case ;
 
 : parse-farkup ( string -- farkup )
-    lines [ dup empty? not ] [ parse-item ] produce nip sift ;
+    split-lines [ dup empty? not ] [ parse-item ] produce nip sift ;
 
 CONSTANT: invalid-url "javascript:alert('Invalid URL in farkup');"
 
@@ -217,7 +217,7 @@ CONSTANT: invalid-url "javascript:alert('Invalid URL in farkup');"
     } cond ;
 
 : render-code ( string mode -- xml )
-    [ lines ] dip htmlize-lines
+    [ split-lines ] dip htmlize-lines
     [XML <pre><-></pre> XML] ;
 
 GENERIC: (write-farkup) ( farkup -- xml )
index 494acbb448a0fc139196f56af1f7d6c28e14e149..4ed90e8006809550587dfdfff63d8ba8be0d3ce8 100644 (file)
@@ -201,7 +201,7 @@ MACRO: sprintf ( format-string -- quot )
           [ >time ]
           [ year>> number>string ]
        } cleave
-    ] output>array unwords ; inline
+    ] output>array join-words ; inline
 
 : week-of-year ( timestamp day -- n )
     [ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
index 04402cedcbdd251809281ed5949c1885cd3c9246..0114fac9b252ccc9f4c5b8100fe4a4f19b5c318d 100644 (file)
@@ -79,7 +79,7 @@ name target ;
 
 : parse-list ( ftp-response -- ftp-response )
     dup strings>>
-    [ words harvest ] map
+    [ split-words harvest ] map
     dup length {
         { 11 [ parse-list-11 ] }
         { 9 [ parse-list-11 ] }
index 65ec841e9ee9818f87baa3a417ef7900fbfab642..e39f4d4f4809a84b5fdd3bb243e4e3354185e852 100644 (file)
@@ -180,7 +180,7 @@ M: ftp-list handle-passive-command
     start-directory [
         utf8 encode-output [
             "." directory.
-        ] with-string-writer lines
+        ] with-string-writer split-lines
         harvest [ ftp-send ] each
     ] with-output-stream finish-directory ;
 
index c49cc5bf36734f0f8682725ceaa4cbd6fc7fe4f0..783ab8e53c3ce08904d06eb47da1ea1778f0163e 100644 (file)
@@ -57,7 +57,7 @@ CONSTANT: revalidate-url-key "__u"
 : validation-failed ( -- * )
     post-request? revalidate-url and [
         begin-conversation
-        nested-forms-key param words harvest nested-forms cset
+        nested-forms-key param split-words harvest nested-forms cset
         form get form cset
         <continue-conversation>
     ] [ <400> ] if*
index 5052a06a15ae3f2a8ff2bfcb12793f7086226d0a..d5569f2847efaef3aedc9de1741caf22dd85aa14 100644 (file)
@@ -66,7 +66,7 @@ CHLOE: base
     compile-a-url [ [XML <base href=<->/> XML] ] [xml-code] ;
 
 : hidden-nested-fields ( -- xml )
-    nested-forms get unwords f like nested-forms-key
+    nested-forms get join-words f like nested-forms-key
     hidden-form-field ;
 
 : render-hidden ( for -- xml )
index ae90e73e0517db984dc9d1b8f60affa490226613..8465a6ec2206bcfbf7108826201d102367165c6b 100644 (file)
@@ -11,7 +11,7 @@ ERROR: gir-not-found name paths ;
 
 M: gir-not-found summary
     [ name>> "“" "” file not found on paths:\n" surround ]
-    [ paths>> unlines ] bi
+    [ paths>> join-lines ] bi
     "\n\nUse the existing path or declare GIR_DIRS environment variable"
     3append ;
 
index c9e6981e068747bc1016976440f0db6c201531e7..99efd3b368451293d1e3aff02165e5de55679a32 100644 (file)
@@ -121,7 +121,7 @@ M: pathname url-of
 : css-classes ( classes -- stylesheet )
     [
         [ css-style " { " "}" surround ] [ "." prepend ] bi* prepend
-    ] { } assoc>map unlines ;
+    ] { } assoc>map join-lines ;
 
 :: css-styles-to-classes ( body -- stylesheet body )
     H{ } clone :> classes
index 33ec69a033325e6bd15c7e8e9b59b01c2a6bbf06..e72c6606e2c00fceaf6dafcb2c1dbe580d7a228f 100644 (file)
@@ -99,7 +99,7 @@ M: f print-element drop ;
     ] ($block) ; inline
 
 : $code ( element -- )
-    unlines dup <input> [ write ] ($code) ;
+    join-lines dup <input> [ write ] ($code) ;
 
 : $syntax ( element -- ) "Syntax" $heading $code ;
 
@@ -122,7 +122,7 @@ M: f print-element drop ;
     "Examples" $heading print-element ;
 
 : $example ( element -- )
-    unclip-last [ unlines ] dip over <input> [
+    unclip-last [ join-lines ] dip over <input> [
         [ print ] [ output-style get format ] bi*
     ] ($code) ;
 
index 0dab4860ac8195218aaff672093e81202c2c688f..f6cc8071f676024ea2311dde0c97bcad3b411b4d 100644 (file)
@@ -21,16 +21,16 @@ IN: help.search
             { \ $vocab-link [ second ] }
             { \ $emphasis [ second ] }
             { \ $subsection [ second article-name ] }
-            { \ $subsections [ rest [ article-name ] map unwords ] }
-            { \ $description [ rest [ element-value ] map unwords ] }
-            { \ $notes [ rest [ element-value ] map unwords ] }
-            { \ $snippet [ rest [ element-value ] map unwords ] }
+            { \ $subsections [ rest [ article-name ] map join-words ] }
+            { \ $description [ rest [ element-value ] map join-words ] }
+            { \ $notes [ rest [ element-value ] map join-words ] }
+            { \ $snippet [ rest [ element-value ] map join-words ] }
             [ 2drop f ]
         } case
     ] [ dup string? [ drop f ] unless ] if ;
 
 MEMO: article-words ( name -- words )
-    article-content [ element-value ] map unwords search-words
+    article-content [ element-value ] map join-words search-words
     [ [ digit? ] all? ] reject
     [ [ { [ letter? ] [ digit? ] } 1|| not ] trim ] map! harvest  ;
 
index 494d2c1294355c3b4b2b568278d0528d83fc409d..fc809078b0789ff805971255231f29910cf04d8b 100644 (file)
@@ -79,7 +79,7 @@ IN: help.syntax
     ] produce nip ;
 
 : code-lines ( str -- seq )
-    lines [ [ blank? ] trim ] map harvest ;
+    split-lines [ [ blank? ] trim ] map harvest ;
 
 : make-example ( str -- seq )
     code-lines dup { [ array? ] [ length 1 > ] } 1&& [
index 3820673d6fb032fd886963ccc811e0a91e305bf3..70867c88e7d9642ffeb9c080766ec20736d4b5ef 100644 (file)
@@ -95,7 +95,7 @@ C: <vocab-author> vocab-author
         [
             [ <$pretty-link> ]
             [ superclass-of <$pretty-link> ]
-            [ "slots" word-prop [ name>> ] map unwords <$snippet> ]
+            [ "slots" word-prop [ name>> ] map join-words <$snippet> ]
             tri 3array
         ] map
         { { $strong "Class" } { $strong "Superclass" } { $strong "Slots" } } prefix
index 1ccbba89e485f93ada3e57e29db71b31834693fc..1d25d5d58a73bd1d89c17527b05f872d6cdb00b8 100644 (file)
@@ -150,11 +150,11 @@ TUPLE: code mode ;
 : <code> ( -- code )
     code new ;
 
-: ?lines ( str/f -- seq )
-    [ { } ] [ lines ] if-empty ;
+: ?split-lines ( str/f -- seq )
+    [ { } ] [ split-lines ] if-empty ;
 
 M: code render*
-    [ ?lines ] [ drop ] [ mode>> value ] tri* htmlize-lines ;
+    [ ?split-lines ] [ drop ] [ mode>> value ] tri* htmlize-lines ;
 
 ! Farkup component
 TUPLE: farkup no-follow disable-images parsed ;
index 6713facbadc197d1b89aca22f976a53bda949627..56bae5b7fd7ea0278c0487da90d5646fa32549ac 100644 (file)
@@ -58,7 +58,7 @@ SYNTAX: %> lexer get parse-%> ;
         [
             parser-quiet? on
             "html.templates.fhtml" use-vocab
-            lines parse-template-lines
+            split-lines parse-template-lines
         ] with-file-vocabs
     ] with-compilation-unit ;
 
index e8bcb674d15007fadec74d87219284818ed1fdd2..bb9c64fc47d7c9e5292d6d425ce5c10912c3fb1f 100644 (file)
@@ -58,7 +58,7 @@ IN: http.client.tests
         "content-type: text/html; charset=UTF-8"
         "date: Wed, 12 Oct 2011 18:57:49 GMT"
         "server: Factor http.server"
-    } [ unlines ] [ "\r\n" join ] bi
+    } [ join-lines ] [ "\r\n" join ] bi
     [ [ read-response ] with-string-reader ] same?
 ] unit-test
 
index 11a9ae186e244e9e5e376d5b10fcfc1e0d8ab740..b1b2508989fd698b071a38721a13cced79631bf9 100644 (file)
@@ -66,7 +66,7 @@ ${ read-request-test-1' } [
     [ read-request ] with-string-reader
     [ write-request ] with-string-writer
     ! normalize crlf
-    lines "\n" join
+    split-lines "\n" join
 ] unit-test
 
 STRING: read-request-test-2
@@ -165,7 +165,7 @@ ${ read-response-test-1' } [
     [ read-response ] with-string-reader
     [ write-response ] with-string-writer
     ! normalize crlf
-    lines "\n" join
+    split-lines "\n" join
 ] unit-test
 
 { t } [
index 574f180b97d2171717632463b8bf211b53da17fe..68b8505a3184c0d0c5a0dbca8b66e741cde56d91 100644 (file)
@@ -221,7 +221,7 @@ TUPLE: post-data data params content-type content-encoding ;
         swap >>content-type ;
 
 : parse-content-type-attributes ( string -- attributes )
-    words harvest [
+    split-words harvest [
         "=" split1
         "\"" ?head drop "\"" ?tail drop
     ] { } map>assoc ;
index abde71429489c30f6d70230382381b565c359e64..8322f924c805e01995c4bb1fb006e17db3feaed2 100644 (file)
@@ -155,6 +155,6 @@ hello
         "connection: close"
         "host: 127.0.0.1:55532"
         "user-agent: Factor http.client"
-    } [ unlines ] [ "\r\n" join ] bi
+    } [ join-lines ] [ "\r\n" join ] bi
     [ string>request ] same?
 ] unit-test
index 16227e333db7ec45f48e1532dde1f4810238623a..e6d4c211544cc8492ce4f5138eccc4b19b37046e 100644 (file)
@@ -38,7 +38,7 @@ io.streams.string kernel math peg sequences tools.test urls ;
         "connection: close"
         "host: 127.0.0.1:55532"
         "user-agent: Factor http.client"
-    } [ unlines ] [ "\r\n" join ] bi
+    } [ join-lines ] [ "\r\n" join ] bi
     [ [ read-request ] with-string-reader ] same?
 ] unit-test
 
index ccfa91e220cb2de4c553eab3bc390c376740938f..760dc75dbd773250dd4231f14ddf9956fd7d6709 100644 (file)
@@ -29,7 +29,7 @@ gb18030 "GB18030" register-encoding
 TUPLE: range ufirst ulast bfirst blast ;
 
 : b>byte-array ( string -- byte-array )
-    words [ hex> ] B{ } map-as ;
+    split-words [ hex> ] B{ } map-as ;
 
 : add-range ( contained ranges -- )
     [
index eeb680ea3342c7fbfe0c015dc09cd66f1d75e5cc..d23ade9fe2f6b202c29f7b156b7f901d2095bb56 100644 (file)
@@ -20,7 +20,7 @@ PRIVATE>
 <PRIVATE
 : parse-iana ( file -- synonym-set )
     utf8 file-lines { "" } split [
-        [ words ] map
+        [ split-words ] map
         [ first { "Name:" "Alias:" } member? ] filter
         values { "None" } diff
     ] map harvest ;
index 1b7764edc3c0ee708be95a1fb3f66bde0dfa5aac..1ad2122d6b7f7f04029ebb0c61106c568f1893f3 100644 (file)
@@ -86,7 +86,7 @@ TUPLE: CreateProcess-args
     ] when ;
 
 : join-arguments ( args -- cmd-line )
-    [ escape-argument ] map unwords ;
+    [ escape-argument ] map join-words ;
 
 : lookup-priority ( process -- n )
     priority>> {
index 31cdea1ec1cb1284a4ae6fefa230cc53c36011d0..8a93f3b73f9585b20a18f8d6410cdd08ac76acbe 100644 (file)
@@ -56,7 +56,7 @@ SYMBOL: message-histogram
     [
         [ first name>> write bl ]
         [ second write ": " write ]
-        [ third unlines write ]
+        [ third join-lines write ]
         tri
     ] histogram.
     nl nl
index a6633f84d0f83d6af0801362dd61c937203bee3a..df64b7fa83e649efd5e8b4de9827f8b0b5babc3f 100644 (file)
@@ -46,7 +46,7 @@ ERROR: bad-log-message-parameters msg word level ;
     check-log-message
     log-service get
     2dup [ log? ] [ ] bi* and [
-        [ [ lines ] [ name>> ] [ name>> ] tri* ] dip
+        [ [ split-lines ] [ name>> ] [ name>> ] tri* ] dip
         4array "log-message" send-to-log-server
     ] [
         4drop
index 84d762b24434e06329fc10f17b4170e826c7f5c8..0c9244d67de7bca1d8deeaf43b1246fe3e09d679 100644 (file)
@@ -95,7 +95,7 @@ M: word log-timestamp. drop "multiline" write ;
         [ date>> log-timestamp. bl ]
         [ level>> pprint bl ]
         [ word-name>> write nl ]
-        [ message>> unlines print ]
+        [ message>> join-lines print ]
     } cleave ;
 
 : log-entries. ( errors -- )
index 911a297ca9470e230c4ad5dc4a67ab69e98ec91a..98cbd9ac9b3bca5b377d40a1cc92ab4a1193548b 100644 (file)
@@ -56,7 +56,7 @@ PRIVATE>
 : unix-factor ( string -- )
     dup string>number [
         [ ": " append write ]
-        [ factors [ number>string ] map unwords print ] bi*
+        [ factors [ number>string ] map join-words print ] bi*
     ] [
         "factor: `" "' is not a valid positive integer" surround print
     ] if* flush ;
index f808cbdde0ceb9c6dedcdf97157b1a453df0661c..68f1bdd329805e49dc6034e9d233b1d0a66ca809 100644 (file)
@@ -33,7 +33,7 @@ C: <mime-variable> mime-variable
     >byte-array write ;
 
 : parse-headers ( string -- hashtable )
-    lines harvest [ parse-header-line ] map >hashtable ;
+    split-lines harvest [ parse-header-line ] map >hashtable ;
 
 : fill-bytes ( multipart -- multipart )
     buffer-size read
index 479700063589bdeb8a09cda3be89ae1b0eda7e0d..a6b0ba534368b2148f7df69c534968ff2092655d 100644 (file)
@@ -11,7 +11,7 @@ IN: opengl.capabilities
     over string?  [ member? ] [ [ member? ] curry any? ] if ;
 
 : gl-extensions ( -- seq )
-    GL_EXTENSIONS glGetString words ;
+    GL_EXTENSIONS glGetString split-words ;
 : has-gl-extensions? ( extensions -- ? )
     gl-extensions [ (has-extension?) ] curry all? ;
 : (make-gl-extensions-error) ( required-extensions -- )
index 5ba1de3373d1f47e559b433900eb3ce178586f9e..0b9b94e31a6ce902bd3ae9afe7dbb7c3b51e8852 100644 (file)
@@ -488,7 +488,7 @@ ERROR: bad-effect quot effect ;
     H{
         { "dup" dup } { "nip" nip } { "over" over } ! kernel
         { "nth" nth } ! sequences
-    } [ lines parse-lines ] with-words ;
+    } [ split-lines parse-lines ] with-words ;
 
 M: ebnf-action (transform)
     ebnf-transform check-action-effect action ;
index 6ed7f2831eab97d37fb38f8878cb1974ca1a1379..8b3fd5879d31c28544ebeed533d31524b56e18e8 100644 (file)
@@ -31,7 +31,7 @@ M: pathname present string>> ;
 M: callable present
     [ "[ ]" ] [
         [ drop "[ " ]
-        [ [ present ] map unwords ]
+        [ [ present ] map join-words ]
         [ drop " ]" ] tri 3append
     ] if-empty ;
 
index 54ca5fea88ecd44b8ae6d59c6c0f483c6bf1c526..b500212ce1a9585ebbee055b136e93fddc52c419 100644 (file)
@@ -24,7 +24,7 @@ and we didn't know hów tö do thât" latin2 encode >quoted ] unit-test
     55 [ "hello" ] replicate concat ;
 
 { f } [ message >quoted "=\r\n" swap subseq? ] unit-test
-{ 1 } [ message >quoted lines length ] unit-test
+{ 1 } [ message >quoted split-lines length ] unit-test
 { t } [ message >quoted-lines "=\r\n" swap subseq? ] unit-test
-{ 4 } [ message >quoted-lines lines length ] unit-test
-{ "===o" } [ message >quoted-lines lines [ last ] "" map-as ] unit-test
+{ 4 } [ message >quoted-lines split-lines length ] unit-test
+{ "===o" } [ message >quoted-lines split-lines [ last ] "" map-as ] unit-test
index 01d0c49e9bb56f5c5aa3195c3527dafff890eaa3..bbcbc623b3166f65d243c2d5d580a13d56b39a7b 100644 (file)
@@ -94,7 +94,7 @@ PRIVATE>
     [ parse-resolv.conf-line ] each ;
 
 : string>resolv.conf ( string -- resolv.conf )
-    lines lines>resolv.conf ;
+    split-lines lines>resolv.conf ;
 
 : path>resolv.conf ( path -- resolv.conf )
     utf8 file-lines lines>resolv.conf ;
index aedaf43b857b59dc2dfd85cfdbdd8fac3dcff9e1..2acf11c2cae9896402b8fecfb0ff6c95f9fd18a9 100644 (file)
@@ -14,8 +14,8 @@ IN: strings.tables
 PRIVATE>
 
 : format-table ( table -- seq )
-    [ [ lines ] map format-row flip ] map concat flip
+    [ [ split-lines ] map format-row flip ] map concat flip
     [ { } ] [
         [ but-last-slice [ format-column ] map! drop ] keep
-        flip [ unwords ] map!
+        flip [ join-words ] map!
     ] if-empty ;
index 042ad38272c5fbae7a08b890e397d5ffedab6ae8..1ff8d172194bd559f40c4a3b5f1f30cfe3d0f859 100644 (file)
@@ -68,7 +68,7 @@ ERROR: can't-deploy-library-file library ;
         [
             "-staging" , "-no-user-init" , "-pic=0" ,
             [ staging-image-name "-output-image=" prepend , ]
-            [ unwords "-include=" prepend , ] bi
+            [ join-words "-include=" prepend , ] bi
         ] [
             input-image-name "-i=" prepend ,
             "-resource-path=" "" resource-path append ,
index 908e479cbc8ad910af0583c41b5b0f1f9115856f..10937ff1525073d346b15fdc63eb53e8a13546a2 100644 (file)
@@ -14,7 +14,7 @@ IN: tools.deploy.config.editor
     parse-fresh [ first assoc-union ] unless-empty ;
 
 : set-deploy-config ( assoc vocab -- )
-    [ [ unparse-use ] without-limits lines ] dip
+    [ [ unparse-use ] without-limits split-lines ] dip
     "deploy.factor" set-vocab-file-lines ;
 
 : set-deploy-flag ( value key vocab -- )
index 0b5b71e476befb3d139513bd2945c92c50c89b03..9b0bd97cf3fd4462c77bf03e98c66c42861600a9 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays calendar calendar.english combinators fry io
 io.directories io.files.info kernel math math.parser prettyprint sequences
-system vocabs sorting.slots calendar.format ;
+system vocabs sorting.slots calendar.format splitting ;
 IN: tools.files
 
 <PRIVATE
@@ -25,7 +25,7 @@ IN: tools.files
         dup year>> dup now year>> =
         [ drop listing-time ] [ nip number>string ] if
         5 CHAR: \s pad-head
-    ] tri 3array unwords ;
+    ] tri 3array join-words ;
 
 : read>string ( ? -- string ) "r" "-" ? ; inline
 
index eecb31cbdda86138dd086da6560debeb60ec1994..6c75d9ca4d46419a337367073a13c4d8f05b80cb 100644 (file)
@@ -139,7 +139,7 @@ STRUCT: kinfo_proc
     [ kinfo_proc memory>struct ] map ;
 
 : ps-arg ( kp_proc -- arg )
-    [ p_pid>> args rest unwords ] [
+    [ p_pid>> args rest join-words ] [
         drop p_comm>> 0 over index [ head ] when* >string
     ] recover ;
 
index 1d3fe34f4abc87319e5ff94f94df1c34a1d64122..779214939f751c4c3dc3a30e20a0a5b7e4dbe5f4 100644 (file)
@@ -341,7 +341,7 @@ PRIVATE>
 SYMBOL: nested-examples
 
 : example-using ( using -- )
-    unwords "example-using" [
+    join-words "example-using" [
         nested-examples get 4 0 ? CHAR: \s <string> "example-indent" [
             "${example-indent}\"Example:\"
 ${example-indent}{ $example \"USING: ${example-using} ;\"
index 1973cb233370594b9c4d3fe6f54efe7a6ebcaa5f..a5c4b26524eddc333b61965fb705fa598d4e30a0 100644 (file)
@@ -639,7 +639,7 @@ PRIVATE>
     "\n" split
     [ rest-slice [ [ blank? ] trim-head-slice ] map! drop ]
     [ but-last-slice [ [ blank? ] trim-tail-slice ] map! drop ]
-    [ unwords ]
+    [ join-words ]
     tri ;
 
 : last-line? ( document line -- ? )
index 270ddc4f21a3369e22394ce698d38d0faf777020..0eab7ae7a8e15a81ce757512ac7f4120d8c3dc1e 100644 (file)
@@ -13,7 +13,7 @@ TUPLE: label < aligned-gadget text font ;
 SLOT: string
 
 M: label string>>
-    text>> dup string? [ unlines ] unless ; inline
+    text>> dup string? [ join-lines ] unless ; inline
 
 <PRIVATE
 
@@ -22,7 +22,7 @@ PREDICATE: string-array < array [ string? ] all? ;
 PRIVATE>
 
 : ?string-lines ( string -- string/array )
-    CHAR: \n over member-eq? [ lines ] when ;
+    CHAR: \n over member-eq? [ split-lines ] when ;
 
 M: label string<<
     [
index b204610bc920e5bf058372b58b783df014fc9dd2..9779e68deed4551efcb2267e9b722befed25d739 100644 (file)
@@ -129,7 +129,7 @@ M: pane-stream stream-write1
     '[
         dup length 3639 >
         [ 3639 over last-grapheme-from cut-slice ] [ f ] if
-        swap "" like split-lines @ dup
+        swap "" like ?split-lines @ dup
     ] loop drop ; inline
 
 M: pane-stream stream-write
@@ -353,7 +353,7 @@ M: paragraph pane-line
     { presented image-style } pick '[ _ key? ] any? [
         pane-text
     ] [
-        [ words ] 2dip
+        [ split-words ] 2dip
         [ pane-bl ] [ pane-text ] bi-curry bi-curry
         interleave
     ] if ;
index 9a39cdc4803a3ad049dfe1fb088e3ab55bf3f60b..98ddb3fcf6af827d3953a35c9b3928879aa96958 100644 (file)
@@ -71,7 +71,7 @@ M: f cell-dim 2drop 0 0 0 ;
 M: f draw-cell 2drop ;
 
 : single-line ( str -- str' )
-    dup [ "\r\n" member? ] any? [ lines unwords ] when ;
+    dup [ "\r\n" member? ] any? [ split-lines join-words ] when ;
 
 M: string cell-dim single-line text-dim first2 ceiling 0 ;
 M: string draw-cell single-line draw-text ;
index afa2fe4f1de0525eaee70a32f0670624226572b1..98c0a0fae9142e9f5fadaa2698f8c3864fd7942c 100644 (file)
@@ -161,7 +161,7 @@ M: interactor stream-readln
 M:: interactor stream-read-unsafe ( n buf interactor -- count )
     n [ 0 ] [
         drop
-        interactor interactor-read dup [ unlines ] when
+        interactor interactor-read dup [ join-lines ] when
         n short [ head-slice 0 buf copy ] keep
     ] if-zero ;
 
@@ -176,7 +176,7 @@ M: interactor stream-read1
 M: interactor stream-read-until
     swap '[
         _ interactor-read [
-            unlines CHAR: \n suffix
+            join-lines CHAR: \n suffix
             [ _ member? ] dupd find
             [ [ head ] when* ] dip dup not
         ] [ f f f ] if*
index 9f57002a59e6159c806a8aad47d38bac3c8fa8b4..1cb09c83194c992fbdad08b838671b487b410d88 100644 (file)
@@ -19,7 +19,7 @@ IN: unicode.collation.tests
 
 : collation-test-lines ( -- lines )
     "vocab:unicode/UCA/CollationTest_SHIFTED.txt.zip"
-    binary file-contents uncompress utf8 decode lines
+    binary file-contents uncompress utf8 decode split-lines
     [ "#" head? ] reject harvest ;
 
 : parse-collation-test-shifted ( -- lines )
index 205e312e725f797018a5db69c7002e285b849879..de39780d5a145e0b85c37d812a89572dc6f9a740 100644 (file)
@@ -59,13 +59,13 @@ ERROR: unknown-cpuinfo-line string ;
     [ CHAR: \t = ] trim-tail [ [ CHAR: \s = ] trim ] bi@
     {
         { "address sizes" [
-            "," split [ [ CHAR: \s = ] trim words first string>number ] map
+            "," split [ [ CHAR: \s = ] trim split-words first string>number ] map
             >>address-sizes
         ] }
         { "apicid" [ string>number >>apicid ] }
         { "bogomips" [ string>number >>bogomips ] }
         { "cache size" [
-            words first [ CHAR: \s = ] trim
+            split-words first [ CHAR: \s = ] trim
             string>number 1024 * >>cache-size
         ] }
         { "cache_alignment" [ string>number >>cache-alignment ] }
@@ -78,7 +78,7 @@ ERROR: unknown-cpuinfo-line string ;
         { "cpuid level" [ string>number >>cpuid-level ] }
         { "f00f_bug" [ "yes" = >>f00f-bug? ] }
         { "fdiv_bug" [ "yes" = >>fdiv-bug? ] }
-        { "flags" [ words harvest >>flags ] }
+        { "flags" [ split-words harvest >>flags ] }
         { "fpu" [ "yes" = >>fpu? ] }
         { "fpu_exception" [ "yes" = >>fpu-exception? ] }
         { "hlt_bug" [ "yes" = >>hlt-bug? ] }
@@ -130,7 +130,7 @@ TUPLE: proc-loadavg
 
 : parse-proc-loadavg ( -- obj )
     "/proc/loadavg" utf8 file-lines first
-    words [
+    split-words [
         {
             [ string>number ]
             [ string>number ]
@@ -189,7 +189,7 @@ TUPLE: proc-meminfo
 ! Different kernels have fewer fields. Make sure we have enough.
 : parse-proc-meminfo ( -- meminfo )
     "/proc/meminfo" utf8 file-lines
-    [ words harvest second string>number 1024 * ] map
+    [ split-words harvest second string>number 1024 * ] map
     proc-meminfo "slots" word-prop length f pad-tail
     [ proc-meminfo boa ] input<sequence ;
 
@@ -220,7 +220,7 @@ TUPLE: proc-cpu-stat name user nice system idle iowait irq softirq steal guest g
         [ second [ line>cpu ] map ]
         [
             third
-            [ " " split1 nip words [ string>number ] map ] map
+            [ " " split1 nip split-words [ string>number ] map ] map
             [
                 {
                     [ ]
@@ -275,7 +275,7 @@ TUPLE: proc-uptime up idle ;
 
 : parse-proc-uptime ( -- uptime )
     "/proc/uptime" utf8 file-lines first
-    words first2 [ string>number seconds ] bi@
+    split-words first2 [ string>number seconds ] bi@
     proc-uptime boa ;
 
 ! /proc/pid/*
@@ -334,7 +334,7 @@ TUPLE: pid-stat pid filename state parent-pid group-id session-id terminal#
 : parse-proc-pid-stat ( pid -- stat )
     "stat" proc-pid-path
     proc-first-line
-    words harvest
+    split-words harvest
     pid-stat "slots" word-prop length "0" pad-tail
     [ dup string>number [ nip ] when* ] map
     [ pid-stat boa ] input<sequence ;
index 6b5dc5b498101c00200b7b28591bf5aefb690f69..d3cc3d83bf98348938d823d8c3ee7698ab298df1 100644 (file)
@@ -15,7 +15,7 @@ IN: vocabs.platforms
 
 : parse-platform-section ( string suffix -- )
     [
-        [ [ lines parse-lines ] curry with-nested-compilation-unit ]
+        [ [ split-lines parse-lines ] curry with-nested-compilation-unit ]
         curry
     ] dip with-vocabulary drop ; inline
 
index ddfd053900fd949ea652e516a41c3115d52c336a..ea5c47ea06c8ef80957e3bff60bd42ab1ef9dae9 100644 (file)
@@ -5,25 +5,22 @@ IN: wrap.strings
 
 <PRIVATE
 
-: split-line ( string -- elements )
+: wrap-split-line ( string -- elements )
     dup [ " \t" member? not ] find drop 0 or
     [ f swap ] [ cut ] if-zero
     " \t" split harvest [ dup length 1 <element> ] map!
     swap [ 0 over length <element> prefix ] when* ;
 
-: split-lines ( string -- elements-lines )
-    lines [ split-line ] map! ;
+: wrap-split-lines ( string -- elements-lines )
+    split-lines [ wrap-split-line ] map! ;
 
 : join-elements ( wrapped-lines -- lines )
-    [ unwords ] map! ;
-
-: join-lines ( strings -- string )
-    unlines ;
+    [ join-words ] map! ;
 
 PRIVATE>
 
 : wrap-lines ( string width -- newlines )
-    [ split-lines ] dip '[ _ wrap join-elements ] map! concat ;
+    [ wrap-split-lines ] dip '[ _ wrap join-elements ] map! concat ;
 
 : wrap-string ( string width -- newstring )
     wrap-lines join-lines ;
index 3faffc0078759cb6700df9532dfb37aca1f40f21..01e41b204dac2b1ce3064509949259e48bd69861 100644 (file)
@@ -6,7 +6,7 @@ splitting memoize kernel io.streams.string xml.writer ;
 { } [
     "<style type=\"text/css\" media=\"screen\" >
     *        {margin:0; padding:0; border:0;}"
-    lines "html" htmlize-lines drop
+    split-lines "html" htmlize-lines drop
 ] unit-test
 
 { } [
index 5a7e8a4eb0c70f806c96226688098f436367a014..bd78f97d1ff9bfade5a41c7897b14cb834de6fe2 100644 (file)
@@ -70,5 +70,5 @@ M: vocab highlight.
     vocab-source-path highlight. ;
 
 M: word highlight.
-    [ see ] with-string-writer lines
+    [ see ] with-string-writer split-lines
     "factor" highlight-lines ;
index 691006c21138209ead733bcfc867512889750519..711e0dc226a1c551973dac41e2fc14c281428df6 100644 (file)
@@ -52,7 +52,7 @@ M: anonymous-intersection (flatten-class)
     ] if-empty ;
 
 M: anonymous-intersection class-name
-    participants>> [ class-name ] map unwords ;
+    participants>> [ class-name ] map join-words ;
 
 PRIVATE>
 
index 5c40dccd84852804e15fe4e5fc54a365d7f3fbd8..6ed0003f648428a91c387bb01dafd1dd262d1563 100644 (file)
@@ -60,7 +60,7 @@ USE: io.streams.string
             "INSTANCE: sequence mixin-forget-test"
             "GENERIC: mixin-forget-test-g ( x -- y )"
             "M: mixin-forget-test mixin-forget-test-g ;"
-        } unlines <string-reader> "mixin-forget-test"
+        } join-lines <string-reader> "mixin-forget-test"
         parse-stream drop
     ] unit-test
 
@@ -75,7 +75,7 @@ USE: io.streams.string
             "INSTANCE: hashtable mixin-forget-test"
             "GENERIC: mixin-forget-test-g ( x -- y )"
             "M: mixin-forget-test mixin-forget-test-g ;"
-        } unlines <string-reader> "mixin-forget-test"
+        } join-lines <string-reader> "mixin-forget-test"
         parse-stream drop
     ] unit-test
 
index 836dc4c8b03f4452bce08b63e552d86d1ba311dd..2f948cd69fd2d8ffd5aeb1bc712b188f8048e051 100644 (file)
@@ -107,7 +107,7 @@ TUPLE: parsing-corner-case x ;
         "    f"
         "    3"
         "}"
-    } unlines eval( -- tuple )
+    } join-lines eval( -- tuple )
 ] unit-test
 
 { T{ parsing-corner-case f 3 } } [
@@ -116,7 +116,7 @@ TUPLE: parsing-corner-case x ;
         "T{ parsing-corner-case"
         "    { x 3 }"
         "}"
-    } unlines eval( -- tuple )
+    } join-lines eval( -- tuple )
 ] unit-test
 
 { T{ parsing-corner-case f 3 } } [
@@ -125,7 +125,7 @@ TUPLE: parsing-corner-case x ;
         "T{ parsing-corner-case {"
         "    x 3 }"
         "}"
-    } unlines eval( -- tuple )
+    } join-lines eval( -- tuple )
 ] unit-test
 
 
@@ -133,14 +133,14 @@ TUPLE: parsing-corner-case x ;
     {
         "USE: classes.tuple.parser.tests T{ parsing-corner-case"
         "    { x 3 }"
-    } unlines eval( -- tuple )
+    } join-lines eval( -- tuple )
 ] [ error>> unexpected-eof? ] must-fail-with
 
 [
     {
         "USE: classes.tuple.parser.tests T{ parsing-corner-case {"
         "    x 3 }"
-    } unlines eval( -- tuple )
+    } join-lines eval( -- tuple )
 ] [ error>> unexpected-eof? ] must-fail-with
 
 TUPLE: bad-inheritance-tuple ;
index 5d7d07bb3e2b2427676642a240a3f79c135b7b09..d1e31d720ce3b8df5a70928e160315f1e5d5fdcd 100644 (file)
@@ -206,7 +206,7 @@ TUPLE: computer cpu ram ;
 C: <computer> computer
 
 { "TUPLE: computer cpu ram ;" } [
-    [ \ computer see ] with-string-writer lines second
+    [ \ computer see ] with-string-writer split-lines second
 ] unit-test
 
 TUPLE: laptop < computer battery ;
@@ -231,7 +231,7 @@ C: <laptop> laptop
 test-laptop-slot-values
 
 { "TUPLE: laptop < computer battery ;" } [
-    [ \ laptop see ] with-string-writer lines second
+    [ \ laptop see ] with-string-writer split-lines second
 ] unit-test
 
 { { tuple computer laptop } } [ laptop superclasses-of ] unit-test
@@ -268,7 +268,7 @@ test-server-slot-values
 { f } [ \ + server? ] unit-test
 
 { "TUPLE: server < computer rackmount ;" } [
-    [ \ server see ] with-string-writer lines second
+    [ \ server see ] with-string-writer split-lines second
 ] unit-test
 
 [
index b292640417179eab1156cbecef16550bbf18e4b2..ad03750e1d80b4b1a8955aac4b8c20b3238a9525 100644 (file)
@@ -117,7 +117,7 @@ M: anonymous-union instance?
     members>> [ instance? ] with any? ;
 
 M: anonymous-union class-name
-    members>> [ class-name ] map unwords ;
+    members>> [ class-name ] map join-words ;
 
 M: union-class normalize-class
     class-members <anonymous-union> normalize-class ;
index 7d17a58dfa34777b6f61103d09fea356a051ac04..53981abc1b31e46cdc587cb93f93aa2b6bb27f7e 100644 (file)
@@ -431,7 +431,7 @@ DEFER: foo
         "GENERIC: change-combination ( obj a -- b )"
         "M: integer change-combination 2drop 1 ;"
         "M: array change-combination 2drop 2 ;"
-    } unlines <string-reader> "change-combination-test" parse-stream drop
+    } join-lines <string-reader> "change-combination-test" parse-stream drop
 ] unit-test
 
 { } [
@@ -441,7 +441,7 @@ DEFER: foo
         "GENERIC#: change-combination 1 ( obj a -- b )"
         "M: integer change-combination 2drop 1 ;"
         "M: array change-combination 2drop 2 ;"
-    } unlines <string-reader> "change-combination-test" parse-stream drop
+    } join-lines <string-reader> "change-combination-test" parse-stream drop
 ] unit-test
 
 { 2 } [
index 9acdf6e0b166dea4714d13583006cbeba3e319d7..a99a6b0622ab79a18d68b8b65f64c1c77f04a727 100644 (file)
@@ -96,7 +96,7 @@ IN: sequences.tests
 { 4 V{ 1 2 3 } } [ 4 V{ 1 4 2 5 3 6 } [ dupd > ] filter! ] unit-test
 
 { "hello world how are you" }
-[ { "hello" "world" "how" "are" "you" } unwords ] unit-test
+[ { "hello" "world" "how" "are" "you" } join-words ] unit-test
 
 { "hello world how are you" }
 [ { "hello" "world" "how" "are" "you" } " " "" join-as ] unit-test
index 0723299692975b2ee85081597458fd4ac1840e7b..51bad5472baf4db9b59bd4e83dc143b74547608a 100644 (file)
@@ -21,7 +21,7 @@ ARTICLE: "sequences-split" "Splitting sequences"
     split-when-slice
 }
 "Splitting a string into lines:"
-{ $subsections lines }
+{ $subsections split-lines }
 "Replacing subsequences with another subsequence:"
 { $subsections replace } ;
 
@@ -94,7 +94,7 @@ HELP: ?tail-slice
 { $values { "seq" sequence } { "end" sequence } { "newseq" slice } { "?" boolean } }
 { $description "Like " { $link ?tail } ", except the resulting sequence is a " { $link slice } "." } ;
 
-HELP: lines
+HELP: split-lines
 { $values { "seq" sequence } { "seq'" { $sequence string } } }
 { $description "Splits a string along line breaks." }
 { $examples
index 2c676545715f82c7b25e89452139a4c1db3f0aa4..757cf7ffd1e327c7ab0d3cf2551fb700f4edc437 100644 (file)
@@ -24,52 +24,52 @@ USING: ascii kernel math sequences splitting strings tools.test ;
 { "Beginning and end" f } [ "Beginning and end" "eginning " ?tail ] unit-test
 
 { { "This" "is" "a" "split" "sentence" } }
-[ "This is a split sentence" words ]
+[ "This is a split sentence" split-words ]
 unit-test
 
 { { "OneWord" } }
-[ "OneWord" words ]
+[ "OneWord" split-words ]
 unit-test
 
 { { "a" "b" "c" "d" "e" "f" } }
 [ "aXbYcXdYeXf" "XY" split ] unit-test
 
 { { "" "" } }
-[ " " words ] unit-test
+[ " " split-words ] unit-test
 
 { { "hey" } }
-[ "hey" words ] unit-test
+[ "hey" split-words ] unit-test
 
 { "Hello world" t } [ "Hello world\n" "\n" ?tail ] unit-test
 { "Hello world" f } [ "Hello world" "\n" ?tail ] unit-test
 { "" t } [ "\n" "\n" ?tail ] unit-test
 { "" f } [ "" "\n" ?tail ] unit-test
 
-{ { } } [ "" lines ] unit-test
-{ { "" } } [ "\n" lines ] unit-test
-{ { "" } } [ "\r" lines ] unit-test
-{ { "" } } [ "\r\n" lines ] unit-test
-{ { "hello" } } [ "hello" lines ] unit-test
-{ { "hello" } } [ "hello\n" lines ] unit-test
-{ { "hello" } } [ "hello\r" lines ] unit-test
-{ { "hello" } } [ "hello\r\n" lines ] unit-test
-{ { "hello" "hi" } } [ "hello\nhi" lines ] unit-test
-{ { "hello" "hi" } } [ "hello\rhi" lines ] unit-test
-{ { "hello" "hi" } } [ "hello\r\nhi" lines ] unit-test
-{ { "hello" "" "" } } [ "hello\n\n\n" lines ] unit-test
-
-{ { } } [ SBUF" " lines ] unit-test
-{ { "" } } [ SBUF" \n" lines ] unit-test
-{ { "" } } [ SBUF" \r" lines ] unit-test
-{ { "" } } [ SBUF" \r\n" lines ] unit-test
-{ { "hello" } } [ SBUF" hello" lines ] unit-test
-{ { "hello" } } [ SBUF" hello\n" lines ] unit-test
-{ { "hello" } } [ SBUF" hello\r" lines ] unit-test
-{ { "hello" } } [ SBUF" hello\r\n" lines ] unit-test
-{ { "hello" "hi" } } [ SBUF" hello\nhi" lines ] unit-test
-{ { "hello" "hi" } } [ SBUF" hello\rhi" lines ] unit-test
-{ { "hello" "hi" } } [ SBUF" hello\r\nhi" lines ] unit-test
-{ { "hello" "" "" } } [ SBUF" hello\n\n\n" lines ] unit-test
+{ { } } [ "" split-lines ] unit-test
+{ { "" } } [ "\n" split-lines ] unit-test
+{ { "" } } [ "\r" split-lines ] unit-test
+{ { "" } } [ "\r\n" split-lines ] unit-test
+{ { "hello" } } [ "hello" split-lines ] unit-test
+{ { "hello" } } [ "hello\n" split-lines ] unit-test
+{ { "hello" } } [ "hello\r" split-lines ] unit-test
+{ { "hello" } } [ "hello\r\n" split-lines ] unit-test
+{ { "hello" "hi" } } [ "hello\nhi" split-lines ] unit-test
+{ { "hello" "hi" } } [ "hello\rhi" split-lines ] unit-test
+{ { "hello" "hi" } } [ "hello\r\nhi" split-lines ] unit-test
+{ { "hello" "" "" } } [ "hello\n\n\n" split-lines ] unit-test
+
+{ { } } [ SBUF" " split-lines ] unit-test
+{ { "" } } [ SBUF" \n" split-lines ] unit-test
+{ { "" } } [ SBUF" \r" split-lines ] unit-test
+{ { "" } } [ SBUF" \r\n" split-lines ] unit-test
+{ { "hello" } } [ SBUF" hello" split-lines ] unit-test
+{ { "hello" } } [ SBUF" hello\n" split-lines ] unit-test
+{ { "hello" } } [ SBUF" hello\r" split-lines ] unit-test
+{ { "hello" } } [ SBUF" hello\r\n" split-lines ] unit-test
+{ { "hello" "hi" } } [ SBUF" hello\nhi" split-lines ] unit-test
+{ { "hello" "hi" } } [ SBUF" hello\rhi" split-lines ] unit-test
+{ { "hello" "hi" } } [ SBUF" hello\r\nhi" split-lines ] unit-test
+{ { "hello" "" "" } } [ SBUF" hello\n\n\n" split-lines ] unit-test
 
 { { "hey" "world" "what's" "happening" } }
 [ "heyAworldBwhat'sChappening" [ LETTER? ] split-when ] unit-test
index ac81862115a118ba7f7a0ee029942bd73602a05f..c53a9a6b1be035f219f800a2262cb47f54262560 100644 (file)
@@ -102,14 +102,14 @@ PRIVATE>
         [ pick subseq ] keep swap
     ] map 2nip ;
 
-! lines uses string-nth-fast which is 50% faster over
+! split-lines uses string-nth-fast which is 50% faster over
 ! nth-unsafe. be careful when changing the definition so that
 ! you don't unoptimize it.
-GENERIC: lines ( seq -- seq' )
+GENERIC: split-lines ( seq -- seq' )
 
-ALIAS: string-lines lines
+ALIAS: string-lines split-lines
 
-M: string lines
+M: string split-lines
     [ V{ } clone 0 ] dip [ 2dup bounds-check? ] [
         2dup [ "\r\n" member? ] find-from swapd [
             over [ [ nip length ] keep ] unless
@@ -119,10 +119,10 @@ M: string lines
         ] when
     ] while 2drop { } like ;
 
-M: sbuf lines "" like lines ;
+M: sbuf split-lines "" like split-lines ;
 
-: unlines-as ( seq exemplar -- seq ) "\n" swap join-as ; inline
-: unlines ( seq -- seq ) "" unlines-as ; inline
-: words ( seq -- seq ) " " split ; inline
-: unwords-as ( seq exemplar -- seq ) " " swap join-as ; inline
-: unwords ( seq -- seq ) " " unwords-as ; inline
+: join-lines-as ( seq exemplar -- seq ) "\n" swap join-as ; inline
+: join-lines ( seq -- seq ) "" join-lines-as ; inline
+: split-words ( seq -- seq ) " " split ; inline
+: join-words-as ( seq exemplar -- seq ) " " swap join-as ; inline
+: join-words ( seq -- seq ) " " join-words-as ; inline
index a8243751aabeb2d2686d577f87a0c5105879d73d..9035ec5867f1537eb82a1c1d16f311b2a0c829a9 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: combinators combinators.smart io kernel math math.parser
-math.ranges sequences ascii ;
+USING: ascii combinators combinators.smart io kernel math
+math.parser math.ranges sequences splitting ;
 IN: 99-bottles
 
 : bottles ( n -- number string )
@@ -15,7 +15,7 @@ IN: 99-bottles
             [ bottles "of beer.\nTake one down, pass it around," ]
             [ 1 - bottles [ >lower ] dip "of beer on the wall." ]
         } cleave
-    ] output>array unwords print nl ;
+    ] output>array join-words print nl ;
 
 : last-verse ( -- )
     "No more bottles of beer on the wall, no more bottles of beer." print
index b4bec779b1deb60b954b281fe1b36dba6c0d6b61..88331bc6fbfaf6329f7a9c86f68478fb18f0d7c8 100644 (file)
@@ -42,12 +42,12 @@ MEMO: 24-from-4 ( a b c d -- ? )
         ] map-sum
     ] map-sum ;
 
-CONSTANT: words { 24-from-1 24-from-2 24-from-3 24-from-4 }
+CONSTANT: 24-words { 24-from-1 24-from-2 24-from-3 24-from-4 }
 
 : backtrack-benchmark ( -- )
-    words [ reset-memoized ] each
+    24-words [ reset-memoized ] each
     find-impossible-24 6479 assert=
-    words [ "memoize" word-prop assoc-size ] map
+    24-words [ "memoize" word-prop assoc-size ] map
     { 1588 5137 4995 10000 } assert= ;
 
 MAIN: backtrack-benchmark
index dd7a6f5374560bfdf84cbeb83f70a409d7502d2b..397209b5ea07855aed7a5e704562aa3610b4e7b7 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs combinators
-concurrency.mailboxes fry io kernel make math math.parser
-math.text.english sequences threads ;
+USING: accessors arrays combinators concurrency.mailboxes io
+kernel make math math.parser math.text.english sequences
+splitting threads ;
 IN: benchmark.chameneos-redux
 
 SYMBOLS: red yellow blue ;
@@ -80,7 +80,7 @@ TUPLE: meeting-place count mailbox ;
     ] if ;
 
 : number>chameneos-string ( n -- string )
-    number>string string>digits [ number>text ] { } map-as unwords ;
+    number>string string>digits [ number>text ] { } map-as join-words ;
 
 : chameneos-redux ( n colors -- )
     [ <meeting-place> ] [ make-creatures ] bi*
index f602db3b03a18c57047a95f005150b3764f7eaee..08471170764a41865a87e937ef615ee8ee893d4b 100644 (file)
@@ -1,7 +1,7 @@
 ! Based on http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=java&id=2
-USING: assocs benchmark.reverse-complement byte-arrays fry io
-io.encodings.ascii io.files locals kernel math sequences
-sequences.private specialized-arrays strings typed alien.data ;
+USING: alien.data assocs benchmark.reverse-complement
+byte-arrays io io.encodings.ascii io.files kernel math sequences
+sequences.private specialized-arrays splitting strings typed ;
 QUALIFIED-WITH: alien.c-types c
 SPECIALIZED-ARRAY: c:double
 IN: benchmark.fasta
@@ -58,14 +58,14 @@ TYPED: make-random-fasta ( seed: float len: fixnum chars: byte-array floats: dou
 : write-description ( desc id -- )
     ">" write write bl print ;
 
-:: split-lines ( n quot -- )
+:: n-split-lines ( n quot -- )
     n line-length /mod
     [ [ line-length quot call ] times ] dip
     quot unless-zero ; inline
 
 TYPED: write-random-fasta ( seed: float n: fixnum chars: byte-array floats: double-array desc id -- seed: float )
     write-description
-    '[ _ _ make-random-fasta ] split-lines ;
+    '[ _ _ make-random-fasta ] n-split-lines ;
 
 TYPED:: make-repeat-fasta ( k: fixnum len: fixnum alu: string -- k': fixnum )
     alu length :> kn
@@ -77,7 +77,7 @@ TYPED:: make-repeat-fasta ( k: fixnum len: fixnum alu: string -- k': fixnum )
     [let
         :> alu
         0 :> k!
-        [| len | k len alu make-repeat-fasta k! ] split-lines
+        [| len | k len alu make-repeat-fasta k! ] n-split-lines
     ] ;
 
 : fasta ( n out -- )
index b3568cf79c6ca3bd8b25b961e23a482cfd31222c..bb3c59649aa72894a6215114d3f669b470a027b2 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2012 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math random sequences strings unicode ;
+USING: kernel math random sequences splitting strings unicode ;
 IN: benchmark.unicode
 
 : crazy-unicode-string ( -- string )
-    8 [ 8 0xffff random-integers ] replicate unwords ;
+    8 [ 8 0xffff random-integers ] replicate join-words ;
 
 : unicode-benchmark ( -- )
     crazy-unicode-string 8 [
index 6adf6a831001adb294742060d0c4d16c6baf88a9..92de4d0267546e2dd09ad44ac21110e9f4315b9a 100644 (file)
@@ -67,7 +67,7 @@ math.parser math.ranges sequences tools.test ;
 
 ! Squares of numbers from 0 to 100
 
-${ 100 [0,b] [ dup * number>string ] map unlines "\n" append }
+${ 100 [0,b] [ dup * number>string ] map join-lines "\n" append }
 [
     "
     ++++[>+++++<-]>[<+++++>-]+<+[
index 47ef5332ad5bc0aca755dab27925130ac8fa3f9e..3bcf20b7fd8f4cd083726680d84260d8b4753ed0 100644 (file)
@@ -9,7 +9,7 @@ SPECIALIZED-ARRAY: c:uint
 IN: bunny.model
 
 : numbers ( str -- seq )
-    words [ string>number ] map sift ;
+    split-words [ string>number ] map sift ;
 
 : (parse-model) ( vs is -- vs is )
     readln [
index 21614a7bfc96e5f52f26e3fe3e43e79d125c06a3..0089025791b501e0acc7689ca04852c8d5155985 100644 (file)
@@ -24,7 +24,7 @@ FROM: compiler.cfg.linearization => number-blocks ;
 IN: compiler.cfg.graphviz
 
 : left-justify ( str -- str' )
-    lines "\\l" join ;
+    split-lines "\\l" join ;
 
 : left-justified ( quot -- str )
     with-string-writer left-justify ; inline
index 5ce852bd31cad754fad70060d9c4f0cdee0f7717..4f011683edc146ce5277682e1542490510132f95 100644 (file)
@@ -14,7 +14,7 @@ M: integer-expr expr>str value>> number>string ;
 
 M: reference-expr expr>str value>> unparse ;
 
-M: sequence expr>str [ unparse ] map unwords ;
+M: sequence expr>str [ unparse ] map join-words ;
 
 M: object expr>str unparse ;
 
index 5cbec86c999128a42c448dcf3a827f9fee800ea9..a435e0626aa3942fa457b81b8159dcbf7e7e3988 100644 (file)
@@ -1375,7 +1375,7 @@ SYMBOL: last-opcode
     ! Process the list of strings, which should make
     ! up an 8080 instruction, and output a quotation
     ! that would implement that instruction.
-    dup unwords instruction-quotations
+    dup join-words instruction-quotations
     [
        "_" join [ "emulate-" % % ] "" make create-word-in
        dup last-instruction set-global
index 03bb49983cede29302ceb87d097357751ac8c06b..611c54be4ee70890c44151af21b703f540ea8a3c 100644 (file)
@@ -133,4 +133,4 @@ PRIVATE>
     now next-times-after ;
 
 : read-crontab ( -- entries )
-    lines harvest [ parse-cronentry ] map ;
+    read-lines harvest [ parse-cronentry ] map ;
index 7a4f7f39ef2a5064ea2f54117c3b837296b1eaf0..f1a753890bfd613a66dfb89eb7c0e0c81455c79b 100644 (file)
@@ -51,7 +51,7 @@ IN: cuda.devices
         [ "Memory: " write cuda-device-memory number>string print ]
         [
             "Capability: " write
-            cuda-device-capability [ number>string ] map unwords print
+            cuda-device-capability [ number>string ] map join-words print
         ]
         [ "Properties: " write cuda-device-properties . ]
         [
index 43112da8c8f681ef1db62969bb965e5e535a7fb8..4489228fa4ff2502c3d40693effa3b6709deef79 100644 (file)
@@ -53,7 +53,7 @@ PRIVATE>
     dup connect-opposite-edges ;
 
 : parse-vertex ( line -- position )
-    words first3 [ string>number >float ] tri@ 0.0 double-4-boa ;
+    split-words first3 [ string>number >float ] tri@ 0.0 double-4-boa ;
 
 : read-vertex ( line vertices -- )
     [ parse-vertex ] dip push ;
@@ -63,7 +63,7 @@ PRIVATE>
     dup 0 >= [ nip 1 - ] [ [ length ] dip + ] if ;
 
 : parse-face ( line vertices -- vertices )
-    [ words ] dip '[ _ parse-face-index ] map ;
+    [ split-words ] dip '[ _ parse-face-index ] map ;
 
 : read-face ( line vertices faces -- )
     [ parse-face ] dip push ;
index de6291800c8ed7aef523b0564fc33a6c86626fd9..9243475bd3c5c83f4c60b5ccfc7884f39e7b80b0 100644 (file)
@@ -78,7 +78,7 @@ CONSTANT: URL V{ }
 : gemini-print ( url body meta -- )
     f pre [
         PAGE delete-all
-        gemini-charset decode lines [
+        gemini-charset decode split-lines [
             { [ pre get not ] [ "=>" ?head ] } 0&& [
                 swap gemini-link present over 2array PAGE push
                 PAGE length swap "[%s] %s\n" printf
index d7612689c7f2cc42e816c5e18d77c3066d13fdec..7846dbdb94ba91c907c6e985efd7ac671a10c711 100644 (file)
@@ -191,4 +191,4 @@ CONSTANT: text-style H{ { font-size 12 } { font-style plain } }
 PRIVATE>
 
 : gemtext. ( base-url body -- )
-    f pre [ lines [ gemini-line. ] with each ] with-variable ;
+    f pre [ split-lines [ gemini-line. ] with each ] with-variable ;
index cf814e5c5ebbf574ccbeb13c8e7d4da0a6e54074..89c48b6adb281306707245f770b5f267ef4c5a38 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors arrays assocs combinators combinators.smart csv
 grouping http.client interval-maps io.encodings.ascii io.files
 io.files.temp io.launcher io.pathnames ip-parser kernel math
-math.parser memoize sequences strings ;
+math.parser sequences splitting strings ;
 IN: geo-ip
 
 : db-path ( -- path ) "IpToCountry.csv" cache-file ;
@@ -33,7 +33,7 @@ TUPLE: ip-entry from to registry assigned city cntry country ;
 
 MEMO: ip-db ( -- seq )
     download-db ascii file-lines
-    [ "#" head? ] reject unlines string>csv
+    [ "#" head? ] reject join-lines string>csv
     [ parse-ip-entry ] map ;
 
 : filter-overlaps ( alist -- alist' )
index 80278f322ffbc303be650b0393d80881a7241cf7..3c976bc1c126e8ce9b060f3ad5ac4a170fc744c0 100644 (file)
@@ -135,9 +135,9 @@ CONSTRUCTOR: <tree> tree ( -- obj ) ;
 : commit. ( commit -- )
     {
         [ hash>> "commit " prepend print ]
-        [ author>> "Author: " prepend words 2 head* unwords print ]
-        [ author>> words git-date>string "Date:   " prepend print ]
-        [ message>> "\n" split [ "    " prepend ] map unlines nl print nl ]
+        [ author>> "Author: " prepend split-words 2 head* join-words print ]
+        [ author>> split-words git-date>string "Date:   " prepend print ]
+        [ message>> "\n" split [ "    " prepend ] map join-lines nl print nl ]
     } cleave ;
 
 ERROR: unknown-field name parameter ;
@@ -155,14 +155,14 @@ ERROR: unknown-field name parameter ;
 
 : git-string>assoc ( string -- assoc )
     "\n\n" split1 [
-        lines [ nip first CHAR: \s = ] monotonic-split
+        split-lines [ nip first CHAR: \s = ] monotonic-split
         [
             dup length 1 = [
                 first " " split1 2array
             ] [
                 [ first " " split1 ]
                 [ rest [ rest ] map ] bi
-                swap prefix unlines 2array
+                swap prefix join-lines 2array
             ] if
         ] map
     ] [
index 83a8dc106a095706947e7a1241181fae10bde41a..5104238c6dc0a151d3623ca1c13f0ad7fc542de1 100644 (file)
@@ -88,7 +88,7 @@ M: gopher-link >url
     ] if ;
 
 : gopher-text ( object -- lines )
-    utf8 decode lines { "." } split1 drop ;
+    utf8 decode split-lines { "." } split1 drop ;
 
 : gopher-text. ( object -- )
     gopher-text [ print ] each ;
index 61bddd35aac5b4e751a105f1c1600b00dfdd850c..444b243eb16222643c995daf8ed32a8db3bee95f 100644 (file)
@@ -332,7 +332,7 @@ SYMBOL: padding-no
 : replace-log-line-numbers ( object log -- log' )
     "\n" split harvest
     [ replace-log-line-number ] with map
-    unlines ;
+    join-lines ;
 
 : gl-shader-kind ( shader-kind -- shader-kind )
     {
index 12cee2e4085eb7f1885ee0d280ce13c336d8b0c0..ef3fc63f346367e21a21dab56f92c1c582218657 100644 (file)
@@ -78,7 +78,7 @@ CONSTANT: IMAP4_SSL_PORT 993
 
 ! Special parsing
 : parse-items ( seq -- items )
-    first words 2 tail ;
+    first split-words 2 tail ;
 
 : parse-list-folders ( str -- folder )
     [[ \* LIST \(([^\)]+)\) "([^"]+)" "?([^"]+)"?]] pcre:findall
@@ -95,11 +95,11 @@ CONSTANT: IMAP4_SSL_PORT 993
 
 : parse-status ( seq -- assoc )
     first [[ \* STATUS "[^"]+" \(([^\)]+)\)]] pcre:findall first last last
-    words 2 group [ string>number ] assoc-map ;
+    split-words 2 group [ string>number ] assoc-map ;
 
 : parse-store-mail-line ( str -- pair/f )
     [[ \(FLAGS \(([^\)]+)\) UID (\d+)\)]] pcre:findall [ f ] [
-        first rest values first2 [ words ] dip string>number swap 2array
+        first rest values first2 [ split-words ] dip string>number swap 2array
     ] if-empty ;
 
 : parse-store-mail ( seq -- assoc )
@@ -144,7 +144,7 @@ PRIVATE>
     drop ;
 
 : status-folder ( mailbox keys -- assoc )
-    [ >utf7imap4 ] dip unwords "STATUS \"%s\" (%s)" sprintf
+    [ >utf7imap4 ] dip join-words "STATUS \"%s\" (%s)" sprintf
     "" command-response parse-status ;
 
 : close-folder ( -- )
index 0166c006813abd17531f97f3adf1036faaa645ab..79ee731c15852bb7f7fe9cd1337386123f2c5022 100644 (file)
@@ -80,9 +80,9 @@ M: irc-message set-irc-command
     {
         [ prefix>> ]
         [ command>> ]
-        [ parameters>> unwords ]
+        [ parameters>> join-words ]
         [ trailing>> dup [ CHAR: : prefix ] when ]
-    } cleave 4array sift unwords ;
+    } cleave 4array sift join-words ;
 
 <PRIVATE
 : ?define-irc-parameters ( class slot-names -- )
index b8c3cd2ca90514c23634f9b34f0286f07e67b7bb..92bf9a3690c255277a7b1eb36931c32e197642af 100644 (file)
@@ -68,7 +68,7 @@ PREDICATE: ctcp < privmsg
 PREDICATE: action < ctcp trailing>> rest "ACTION" head? ;
 
 M: rpl-names post-process-irc-message ( rpl-names -- )
-    [ [ blank? ] trim words ] change-nicks drop ;
+    [ [ ascii:blank? ] trim split-words ] change-nicks drop ;
 
 M: ctcp post-process-irc-message ( ctcp -- )
     [ rest but-last ] change-text drop ;
index 9d28f33503bf0c5f88ae628bb5b428965ec538fe..991813f4d3df621b5cb7ac0a9b76254e1820d987 100644 (file)
@@ -13,7 +13,7 @@ IN: irc.messages.parser
 : split-message ( string -- prefix command parameters trailing )
     ":" ?head [ " " split1 ] [ f swap ] if
     ":" split1
-    [ words harvest unclip swap ] dip ;
+    [ split-words harvest unclip swap ] dip ;
 
 : sender ( irc-message -- sender )
     prefix>> [ ":" ?head drop "!" split-at-first drop ] [ f ] if* ;
index 9dffc1603e2138d5955e181e3a41a8e1828e16dd..94ca2867b09ecde30083df6b0af3fc40921f8967 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors calendar calendar.format fonts fry grouping
-kernel math sequences timers ui ui.gadgets ui.gadgets.labels ;
+USING: accessors calendar calendar.format fonts grouping kernel
+math sequences splitting timers ui ui.gadgets ui.gadgets.labels ;
 IN: lcd
 
 : lcd-digit ( digit row -- str )
@@ -16,7 +16,7 @@ IN: lcd
     '[ _ lcd-digit ] { } map-as concat ;
 
 : lcd ( digit-str -- string )
-    4 <iota> [ lcd-row ] with map unlines ;
+    4 <iota> [ lcd-row ] with map join-lines ;
 
 TUPLE: time-display < label timer ;
 
index 4a2fc5071929244aa6047fc649736639097fa70f..e3ad04fadcd9b9c58578a44113b1de6c1c6f5097 100644 (file)
@@ -20,6 +20,6 @@ M: literate-lexer skip-blank
     ] [ call-next-method ] if ;
 
 SYNTAX: <LITERATE
-    "LITERATE>" parse-multiline-string lines [
+    "LITERATE>" parse-multiline-string string-lines [
         <literate-lexer> (parse-lines) append!
     ] with-nested-compilation-unit ;
index 0770d1a0b10ff01e30d137218b6659582c01aec5..87b8f9ed248b9ff7f036f8d41a3f866922c5f954 100644 (file)
@@ -23,7 +23,7 @@ C: <data-set> data-set
     utf8 file-contents ;
 
 : load-tabular-file ( name -- lines )
-    load-file [ blank? ] trim lines
+    load-file [ blank? ] trim split-lines
     [ [ blank? ] split-when harvest ] map harvest ;
 
 : numerify ( table -- data names )
index e66debb4c76b68e0e5000726ad7e5b43385163c8..c2c9019503ac433d01c3062f23cb99dcea0825a2 100644 (file)
@@ -8,7 +8,7 @@ IN: mason.git
 
 : git-id ( -- id )
     { "git" "show" } utf8 [ read-lines ] with-process-reader
-    first words second ;
+    first split-words second ;
 
 <PRIVATE
 
index f505556b70a84e1bb9dc09b95f658c1cdf99488c..3ffcf6140292db796381f7da232b722095ac16ae 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: assocs combinators.smart debugger fry io.encodings.utf8
-io.files io.streams.string kernel literals locals mason.common
-mason.config mason.disk mason.test math namespaces sequences
+USING: assocs combinators.smart debugger io.encodings.utf8
+io.files io.streams.string kernel literals mason.common
+mason.config mason.disk math namespaces sequences splitting
 xml.syntax xml.writer ;
 IN: mason.report
 
@@ -37,7 +37,7 @@ IN: mason.report
     ] with-file-writer ; inline
 
 : file-tail ( file encoding lines -- seq )
-    [ file-lines ] dip short tail* unlines ;
+    [ file-lines ] dip short tail* join-lines ;
 
 :: failed-report ( error file what -- status )
     [
index daf90033b567cbcc4d8ba587688d969540bca618..2206c5e13bd16c20db922b4ad521a7b4bff4bd56 100644 (file)
@@ -70,7 +70,7 @@ MEMO: units ( -- seq ) ! up to 10^99
 
 : over-1000000 ( n -- str )
     3 digit-groups [ 1 + units nth n-units ] map-index sift
-    reverse unwords ;
+    reverse join-words ;
 
 : decompose ( n -- str ) 1000000 /mod [ over-1000000 ] dip
     dup 0 > [ basic space-append ] [ drop ] if ;
index cba09c6bd3d6693a159f6757248baccab6e8b9d9..427c3d689b81c55d3907cd0a48639f6025638250 100644 (file)
@@ -275,7 +275,7 @@ CONSTANT: compass-directions H{
             [ drop f ]
         } case [
             2 group dup [ weather key? ] all?
-            [ [ weather at ] map unwords ]
+            [ [ weather at ] map join-words ]
             [ concat parse-glossary ] if
         ] dip prepend
     ] if ;
@@ -488,7 +488,7 @@ CONSTANT: high-clouds H{
     [ [ f ] [ low-clouds at "low clouds are %s" sprintf ] if-zero ]
     [ [ f ] [ mid-clouds at "middle clouds are %s" sprintf ] if-zero ]
     [ [ f ] [ high-clouds at "high clouds are %s" sprintf ] if-zero ]
-    tri* 3array unwords ;
+    tri* 3array join-words ;
 
 : parse-inches ( str -- str' )
     dup [ CHAR: / = ] all? [ drop "unknown" ] [
@@ -524,7 +524,7 @@ CONSTANT: high-clouds H{
     "sea-level pressure is %s hPa" sprintf ;
 
 : parse-lightning ( str -- str' )
-    "LTG" ?head drop 2 group [ lightning at ] map unwords ;
+    "LTG" ?head drop 2 group [ lightning at ] map join-words ;
 
 CONSTANT: re-recent-weather R/ ((\w{2})?[BE]\d{2,4}((\w{2})?[BE]\d{2,4})?)+/
 
@@ -547,7 +547,7 @@ CONSTANT: re-recent-weather R/ ((\w{2})?[BE]\d{2,4}((\w{2})?[BE]\d{2,4})?)+/
 
 : parse-recent-weather ( str -- str' )
     split-recent-weather
-    [ (parse-recent-weather) ] map unwords ;
+    [ (parse-recent-weather) ] map join-words ;
 
 : parse-varying ( str -- str' )
     "V" split1 [ string>number ] bi@
@@ -604,7 +604,7 @@ CONSTANT: re-recent-weather R/ ((\w{2})?[BE]\d{2,4}((\w{2})?[BE]\d{2,4})?)+/
     } cond ;
 
 : metar-remarks ( report seq -- report )
-    [ parse-remark ] map unwords >>remarks ;
+    [ parse-remark ] map join-words >>remarks ;
 
 : <metar-report> ( metar -- report )
     [ metar-report new ] dip [ >>raw ] keep
@@ -743,7 +743,7 @@ sky-condition raw ;
 
 : <taf-report> ( taf -- report )
     [ taf-report new ] dip [ >>raw ] keep
-    lines [ [ blank? ] trim ] map
+    split-lines [ [ blank? ] trim ] map
     rest dup first "TAF" = [ rest ] when
     harvest unclip swapd taf-body swap taf-partials ;
 
index c9789e2fdac5aeda3a38dcb9740d3d828b8ffa8f..483eaf64ff5269b05c88d6dd4be2e1111cd4ebe4 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators combinators.short-circuit
 generalizations kernel make math modern modern.slices multiline
-sequences sequences.extras strings unicode ;
+sequences sequences.extras splitting strings unicode ;
 IN: modern.html
 
 TUPLE: tag name open-close-delimiter props children ;
@@ -187,12 +187,12 @@ GENERIC: write-html ( tag -- )
 
 M: doctype write-html
     [ open>> % ]
-    [ values>> [ >value ] map unwords [ " " % % ] unless-empty ]
+    [ values>> [ >value ] map join-words [ " " % % ] unless-empty ]
     [ close>> % ] tri ;
 
 
 : write-props ( seq -- )
-    [ dup array? [ first2 >value "=" glue ] [ >value ] if ] map unwords [ " " % % ] unless-empty ;
+    [ dup array? [ first2 >value "=" glue ] [ >value ] if ] map join-words [ " " % % ] unless-empty ;
 
 M: open-tag write-html
     {
index 84e250febd4182a68515afba2d78b754be21c141..6ea7b3ef3685b64fd6e1fd0aed471e931e8fd630 100644 (file)
@@ -87,19 +87,19 @@ CONSTANT: morse-code-table $[
 <PRIVATE
 
 : word>morse ( str -- morse )
-    [ ch>morse ] { } map-as unwords ;
+    [ ch>morse ] { } map-as join-words ;
 
 : sentence>morse ( str -- morse )
-    words [ word>morse ] map " / " join ;
+    split-words [ word>morse ] map " / " join ;
 
 : trim-blanks ( str -- newstr )
     [ blank? ] trim ; inline
 
 : morse>word ( morse -- str )
-    words [ morse>ch ] "" map-as ;
+    split-words [ morse>ch ] "" map-as ;
 
 : morse>sentence ( morse -- sentence )
-    "/" split [ trim-blanks morse>word ] map unwords ;
+    "/" split [ trim-blanks morse>word ] map join-words ;
 
 : replace-underscores ( str -- str' )
     [ dup CHAR: _ = [ drop CHAR: - ] when ] map ;
index 990b0272694bbae52fb4fcefbb75d616cadbe0ad..c8e8db2851d2f55614573c195e63ee064960786e 100644 (file)
@@ -108,7 +108,7 @@ M: p pdf-render
 
 M: p pdf-width
     [ style>> set-style ] keep
-    [ font>> ] [ string>> ] bi* lines
+    [ font>> ] [ string>> ] bi* split-lines
     [ dupd text-width ] map nip supremum ;
 
 
@@ -141,7 +141,7 @@ M: text pdf-render
 
 M: text pdf-width
     [ style>> set-style ] keep
-    [ font>> ] [ string>> ] bi* lines
+    [ font>> ] [ string>> ] bi* split-lines
     [ dupd text-width ] map nip supremum ;
 
 
@@ -318,7 +318,7 @@ M: table pdf-width
         "/Type /Catalog"
         "/Pages 15 0 R"
         ">>"
-    } unlines ;
+    } join-lines ;
 
 : pdf-pages ( n -- str )
     [
@@ -332,7 +332,7 @@ M: table pdf-width
             "/Kids [ " "]" surround ,
         ] bi
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-page ( n -- page )
     [
@@ -347,7 +347,7 @@ M: table pdf-width
         "/F10 12 0 R /F11 13 0 R /F12 14 0 R" ,
         ">> >>" ,
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-trailer ( objects -- str )
     [
@@ -366,7 +366,7 @@ M: table pdf-width
         "startxref" ,
         [ length 1 + ] map-sum 9 + "%d" sprintf ,
         "%%EOF" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 SYMBOLS: pdf-producer pdf-author pdf-creator ;
 
@@ -425,7 +425,7 @@ TUPLE: pdf info pages fonts ;
     dup length [1,b] zip [ first2 pdf-object ] map ;
 
 : objects>pdf ( objects -- str )
-    [ unlines "\n" append "%PDF-1.4\n" ]
+    [ join-lines "\n" append "%PDF-1.4\n" ]
     [ pdf-trailer ] bi surround ;
 
 ! Rename to pdf>string, have it take a <pdf> object?
index da99872e447f3cc295efe618dbb9234afd841a89..a790d4151727ae07890e1c5b64752e11bb773b6a 100644 (file)
@@ -6,7 +6,7 @@ USING: io.files io.styles kernel pdf.layout sequences splitting ;
 IN: pdf
 
 : text-to-pdf ( str -- pdf )
-    lines [
+    split-lines [
         H{ { font-name "monospace" } { font-size 10 } } <p>
     ] map pdf>string ;
 
index 39efff65bab544c4fbef0792d99e25954056972e..f8ab95c1774054d951f62c51aea878a8cb73ed9d 100644 (file)
@@ -11,7 +11,7 @@ IN: pdf.streams
 ! FIXME: what about "proper" tab support?
 
 : string>texts ( string style -- seq )
-    [ lines ] dip '[ _ <text> 1array ] map
+    [ split-lines ] dip '[ _ <text> 1array ] map
     <br> 1array join ;
 
 PRIVATE>
index e2122f02c6c66a67de6506bfd341d7647499efbe..effc913b943ccb506a0ec196c7caf4c641b4c747 100644 (file)
@@ -59,7 +59,7 @@ M: font pdf-value
         } cleave
         "/BaseFont " prepend ,
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 M: timestamp pdf-value
     "%Y%m%d%H%M%S" strftime "D:" prepend ;
index f445c50c98f522176ffceabd4e7b466fa8462201..9132798318ebc32c21cbd94261718cd24b254935 100644 (file)
@@ -79,7 +79,7 @@ M: string >ckf >upper 1 cut (>ckf) ;
 M: integer >ckf ;
 
 : parse-cards ( string -- seq )
-    words [ >ckf ] map ;
+    split-words [ >ckf ] map ;
 
 : flush? ( cards -- ? )
     0xF000 [ bitand ] reduce 0 = not ;
index 576393d577f9a6efedad27d9b88a4584dec33729..439f2ecf7eaf3803609ef894f8aa784b7adb013b 100644 (file)
@@ -45,14 +45,14 @@ TUPLE: raw-source top headers content ;
 : get-ok-and-total ( -- total )
     stream [
         readln dup "+OK" head? [
-            words second string>number dup account count<<
+            split-words second string>number dup account count<<
         ] [ throw ] if
     ] with-stream* ;
 
 : get-ok-and-uidl ( -- uidl )
     stream [
         readln dup "+OK" head? [
-            words last
+            split-words last
         ] [ throw ] if
     ] with-stream* ;
 
index c0c0fd111703b1d5a2cb8472d62372ab41456228..78dc45a96145ae39c3511ebf5ca993ab53122e0d 100644 (file)
@@ -39,7 +39,7 @@ IN: project-euler.067
 
 : source-067 ( -- seq )
     "resource:extra/project-euler/067/triangle.txt"
-    ascii file-lines [ words [ string>number ] map ] map ;
+    ascii file-lines [ split-words [ string>number ] map ] map ;
 
 PRIVATE>
 
index 48a62c15ee6842a585beb47341b35c2d393259b0..f5e299cb9447aa1a80d1dd570530dfa5d79efab6 100644 (file)
@@ -51,7 +51,7 @@ M: multiple-choice-question generate-question*
     [ n>> ] [ generator>> ] bi
     '[ _ generate-question* ] replicate ;
 
-: trim-blanks ( seq -- seq' ) words harvest unwords ;
+: trim-blanks ( seq -- seq' ) split-words harvest join-words ;
 : first-n-letters ( n -- seq ) <iota> [ CHAR: a + 1string ] map ;
 : alphabet-zip ( seq -- zip ) [ length <iota> [ CHAR: a + 1string ] { } map-as ] keep zip ;
 M: question parse-response drop trim-blanks ;
@@ -96,7 +96,7 @@ CONSTANT: stack-shufflers { dup 2dup drop 2drop swap over rot -rot roll -roll 2d
 M: stack-shuffler generate-question*
     n-shufflers>> [ stack-shufflers random ] [ ] replicate-as
     [ inputs first-n-letters ] keep
-    '[ _ _ with-datastack unwords ] ;
+    '[ _ _ with-datastack join-words ] ;
 
 M: question ask-question generated>> . ;
 M: string-response ask-question generated>> . ;
index fad70fb34d964309cae9c51ae1dd85cb881080be..defb520f9c4cb5c3bfe1eac0a331b6559c72bef4 100644 (file)
@@ -32,7 +32,7 @@ visit-time request-rate crawl-delay unknowns ;
     >robots.txt-url http-get nip ;
 
 : normalize-robots.txt ( string -- sitemaps seq )
-    lines
+    split-lines
     [ [ blank? ] trim ] map
     [ "#" head? ] reject harvest
     [ ":" split1 [ [ blank? ] trim ] bi@ [ >lower ] dip  ] { } map>assoc
index 5db404c8d8f4d44c5837119861a34aafb62b181d..89931cd18b0a98575603939107e8d6f747f20480 100644 (file)
@@ -38,6 +38,6 @@ CONSTANT: words {
 : select ( seq -- seq' ) [ amb-lazy ] map ;
 
 : search ( -- )
-    words select dup sentence-match? [ unwords ] [ fail ] if . ;
+    words select dup sentence-match? [ join-words ] [ fail ] if . ;
 
 MAIN: search
index 381a820ce5486c03b04f509366824dd9f9b91275..c2ba8f48720b0be5c56b3589bdd162dfbaa17da8 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (c) 2012 Anonymous
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io kernel math sequences ;
+USING: io kernel math sequences splitting ;
 IN: rosetta-code.sierpinski-triangle
 
 ! http://rosettacode.org/wiki/Sierpinski_triangle
@@ -31,7 +31,7 @@ IN: rosetta-code.sierpinski-triangle
     [ drop [ dup " " glue ] map ] 2bi append ;
 
 : (sierpinski) ( triangle spaces n -- triangle' )
-    dup 0 = [ 2drop unlines ] [
+    dup 0 = [ 2drop join-lines ] [
         [
             [ iterate-triangle ]
             [ nip dup append ] 2bi
index 1fdac5293fd674eb1aecbc7e5f1697554acae018..2722ea61d328a3e28cedd4562c4763a85ef84d61 100644 (file)
@@ -34,7 +34,7 @@ TUPLE: maxlicense max-count current-count times ;
 
 : out? ( line -- ? ) [ "OUT" ] dip subseq? ; inline
 
-: line-time ( line -- time ) words harvest fourth ; inline
+: line-time ( line -- time ) split-words harvest fourth ; inline
 
 : update-max-count ( max -- max' )
     dup [ current-count>> ] [ max-count>> ] bi >
index f01f28ad9c58c8d18b2b31b56bf46834f912a6eb..dc8ec7b139b6cc0fe3531b85da090ec13ad72701 100644 (file)
@@ -19,7 +19,7 @@ M: div-insn eval-insn drop [ / ] binary-op ;
 M: push-insn eval-insn value>> swons ;
 
 : rpn-tokenize ( string -- string' )
-    words harvest sequence>list ;
+    split-words harvest sequence>list ;
 
 : rpn-parse ( string -- tokens )
     rpn-tokenize [
index eac54a0f387e23e362829b2290a17cf877fdb7e7..ce153d840b4ab699125b4379eb59146cd4500dfd 100644 (file)
@@ -20,13 +20,13 @@ GENERIC: array-element>string ( object -- string )
 M: object array-element>string smalltalk>string ;
 
 M: array array-element>string
-    [ array-element>string ] map unwords "(" ")" surround ;
+    [ array-element>string ] map join-words "(" ")" surround ;
 
 M: array smalltalk>string
     array-element>string "#" prepend ;
 
 M: byte-array smalltalk>string
-    [ number>string ] { } map-as unwords "#[" "]" surround ;
+    [ number>string ] { } map-as join-words "#[" "]" surround ;
 
 M: symbol smalltalk>string
     name>> smalltalk>string "#" prepend ;
index 98af8bbe3205c454bd939ddca1377a5ebbdc57bd..b8b42f5dfb27c16412abf26769e3069d3fadc0d6 100644 (file)
@@ -24,9 +24,9 @@ TUPLE: srt-chunk id begin-time end-time rect text ;
     [ ?first string>number ]
     [
         ?second "  " split1
-        [ "-->" split1 [ [ blank? ] trim parse-srt-timestamp ] bi@ ]
+        [ "-->" split1 [ [ ascii:blank? ] trim parse-srt-timestamp ] bi@ ]
         [
-            [ blank? ] trim words sift [
+            [ ascii:blank? ] trim split-words sift [
                 f
             ] [
                 [ ":" split1 nip string>number ] map
@@ -34,14 +34,14 @@ TUPLE: srt-chunk id begin-time end-time rect text ;
             ] if-empty
         ] bi*
     ]
-    [ 2 tail unlines ] tri srt-chunk boa ;
+    [ 2 tail join-lines ] tri srt-chunk boa ;
 
 : parse-srt-lines ( seq -- seq' )
     { "" } split harvest
     [ parse-srt-chunk ] { } map-as ;
 
 : parse-srt-string ( seq -- seq' )
-    lines parse-srt-lines ;
+    split-lines parse-srt-lines ;
 
 : parse-srt-file ( path -- seq )
     utf8 file-lines parse-srt-lines ;
index c6159dfee8b2cbd93da852387a889e250c5fc308..7d54e0ea477d397ae2ca51de412b31b9706c2690 100644 (file)
@@ -36,7 +36,7 @@ IN: text-to-pdf
         "/Author " "USER" os-env "unknown" or pdf-string append ,
         "/Creator (created with Factor)" ,
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-catalog ( -- str )
     {
@@ -44,7 +44,7 @@ IN: text-to-pdf
         "/Type /Catalog"
         "/Pages 4 0 R"
         ">>"
-    } unlines ;
+    } join-lines ;
 
 : pdf-font ( -- str )
     {
@@ -53,7 +53,7 @@ IN: text-to-pdf
         "/Subtype /Type1"
         "/BaseFont /Courier"
         ">>"
-    } unlines ;
+    } join-lines ;
 
 : pdf-pages ( n -- str )
     [
@@ -67,7 +67,7 @@ IN: text-to-pdf
             "/Kids [ " "]" surround ,
         ] bi
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-text ( lines -- str )
     [
@@ -77,7 +77,7 @@ IN: text-to-pdf
         "12 TL" ,
         [ pdf-string "'" append , ] each
         "ET" ,
-    ] { } make unlines pdf-stream ;
+    ] { } make join-lines pdf-stream ;
 
 : pdf-page ( n -- page )
     [
@@ -87,7 +87,7 @@ IN: text-to-pdf
         1 + "/Contents %d 0 R" sprintf ,
         "/Resources << /Font << /F1 3 0 R >> >>" ,
         ">>" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : pdf-trailer ( objects -- str )
     [
@@ -106,10 +106,10 @@ IN: text-to-pdf
         "startxref" ,
         [ length 1 + ] map-sum 9 + "%d" sprintf ,
         "%%EOF" ,
-    ] { } make unlines ;
+    ] { } make join-lines ;
 
 : string>lines ( str -- lines )
-    "\t" split "    " join lines
+    "\t" split "    " join split-lines
     [ [ " " ] when-empty ] map ;
 
 : lines>pages ( lines -- pages )
@@ -127,7 +127,7 @@ IN: text-to-pdf
     dup length [1,b] zip [ first2 pdf-object ] map ;
 
 : objects>pdf ( objects -- str )
-    [ unlines "\n" append "%PDF-1.4\n" ]
+    [ join-lines "\n" append "%PDF-1.4\n" ]
     [ pdf-trailer ] bi surround ;
 
 PRIVATE>
index f2c4e498efd9c00dfd34ce6a84e1232b36432b71..5e72d506903b81528efddd5a97e279994ba21865 100644 (file)
@@ -2,8 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license
 
 USING: combinators command-line generic io kernel math
-math.text.english namespaces present sequences strings system
-ui.operations vocabs ;
+math.text.english namespaces present sequences splitting
+strings system ui.operations vocabs ;
 
 IN: text-to-speech
 
@@ -32,7 +32,7 @@ M: integer speak number>text speak-text ;
     command-line get [
         [ speak ] each-line
     ] [
-        unwords speak
+        join-words speak
     ] if-empty ;
 
 MAIN: speak-main
index 13401d87fdc616293397f7aa04437d42162c9f35..493c259fa423ada7a49e6c8e2ae8d88485e23252 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: command-line io kernel namespaces sequences ;
+USING: command-line io kernel namespaces sequences splitting ;
 
 IN: tools.echo
 
@@ -9,7 +9,7 @@ IN: tools.echo
     [ first "-n" = ] keep over [ rest ] when ;
 
 : echo-args ( args -- )
-    -n? unwords write [ nl ] unless ;
+    -n? join-words write [ nl ] unless ;
 
 : run-echo ( -- )
     command-line get [ nl ] [ echo-args ] if-empty ;
index 554ff4b65e7563076dc8b1a92ef8facfac2d97c7..cd172e1c3b71cfa142391c8805e68de57ae1d349 100644 (file)
@@ -27,7 +27,7 @@ IN: txon
 DEFER: name/values
 
 : (parse-value) ( string -- values )
-    decode-value lines
+    decode-value split-lines
     [ "" ] [ dup length 1 = [ first ] when ] if-empty ;
 
 : parse-value ( string -- remain value )
@@ -66,12 +66,12 @@ PRIVATE>
 GENERIC: >txon ( object -- string )
 
 M: sequence >txon
-    [ >txon ] map unlines ;
+    [ >txon ] map join-lines ;
 
 M: assoc >txon
     >alist [
         first2 [ encode-value ] [ >txon ] bi* "%s:`%s`" sprintf
-    ] map unlines ;
+    ] map join-lines ;
 
 M: string >txon
     encode-value ;
index c2e0446d144a6d097dd120c914ef8def33d7a46d..816d9fe633fbc412d09027c9d2983bb260a367ec 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io kernel make sequences webapps.mason.version.common
-webapps.mason.version.files ;
+USING: io kernel make sequences splitting
+webapps.mason.version.common webapps.mason.version.files ;
 IN: webapps.mason.version.binary
 
 : binary-release-command ( version builder -- command )
@@ -13,7 +13,7 @@ IN: webapps.mason.version.binary
     ] "" make ;
 
 : binary-release-script ( version builders -- string )
-    [ binary-release-command ] with map unlines ;
+    [ binary-release-command ] with map join-lines ;
 
 : do-binary-release ( version builders -- )
     "Copying binary releases to release directory..." print flush
index 385f0b8dba4b2ee88f6f87e47718a8da557bc004..b7a1e9818d10bb6a2b91fdbf2584b1b51eb20403 100644 (file)
@@ -297,7 +297,7 @@ M: revision feed-entry-url id>> revision-url ;
                 [ "new" [ from-object ] nest-form ]
                 bi*
             ]
-            [ [ content>> lines ] bi@ lcs-diff "diff" set-value ]
+            [ [ content>> split-lines ] bi@ lcs-diff "diff" set-value ]
             2bi
         ] >>init
 
index 3e1d0c37319602184e004cf39f398d38b6c2ea23..5778ac7001b205d4e90e97ffd7a7ac18ca3f00fe 100644 (file)
@@ -75,7 +75,7 @@ PRIVATE>
 : article. ( name -- )
     wikipedia-url http-get nip parse-html
     "content" find-by-id-between
-    html-text lines
-    [ [ blank? ] trim ] map harvest [
+    html-text split-lines
+    [ [ ascii:blank? ] trim ] map harvest [
         html-unescape 72 wrap-string print nl
     ] each ;
index b00c27702c00cfac42ff704d0d0a4a2ee06e4295..14540aa5c71d16bc1d742766e4913b8b58f5cb21 100644 (file)
@@ -43,7 +43,7 @@ PRIVATE>
         [ "title" attr "%s:\n" printf ]
         [
             "plaintext" deep-tags-named [
-                children>string lines
+                children>string split-lines
                 [ "  %s\n" printf ] each
             ] each
         ] bi
index f165f7fd5359518579c299d7d905d9ac7473617d..e263e9b83c6003a917b06163a6dcbb18def8d7a3 100644 (file)
@@ -15,7 +15,7 @@ IN: zeromq.examples.wuclient
         2dup >byte-array ZMQ_SUBSCRIBE swap zmq-setopt
         0 100 dup [
             [ pick 0 zmq-recv
-              >string words [ string>number ] map second +
+              >string split-words [ string>number ] map second +
             ] times
         ] dip
         / "Average temperature for zipcode '%s' was %dF\n" printf