unwords

unwords joins words with separating spaces (U+0020 SPACE). unwords is neither left nor right inverse of words:
>>> words (unwords [" "])
[]

>>> unwords (words "foo\nbar")
"foo bar"

Examples

>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"
>>> unwords ["foo", "bar", "", "baz"]
"foo bar  baz"
The unwords function is analogous to the unlines function, on words.
O(n) Joins words using single space characters.
unwords joins words with separating spaces (U+0020 SPACE).
>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"
unwords is neither left nor right inverse of words:
>>> words (unwords [" "])
[]

>>> unwords (words "foo\nbar")
"foo bar"
Intersperses string chunks sent to the given OutputStream with spaces. See intersperse and unwords.
ghci> os <- Streams.unwords Streams.stdout
ghci> forM_ [Just "Hello,", Nothing, Just "world!\n"] $ w -> Streams.write w os
Hello, world!
unwords takes list of Text values and joins them with space character. Actual type of this function is the following:
unwords :: [Text] -> Text
but it was given a more complex type to provide friendlier compile time errors.
>>> unwords []
""

>>> unwords ["singleWord"]
"singleWord"

>>> unwords ["word", "another"]
"word another"

>>> unwords (["word", "another"] :: [String])
...
... 'unwords' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...

>>> unwords [True, False]
...
... 'unwords' works with 'Text'
But given: 'Bool'
...
unwords is an inverse operation to words. It joins words with separating spaces.
>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"
Join a list of textual sequences using separating spaces.
> unwords ["abc","def","ghi"]
"abc def ghi"
Convert delimited words back to a byte stream Note: This function is purely for demonstration purposes since it assumes a particular encoding. You should prefer the Text equivalent of this function from the pipes-text library.
The unwords function is analogous to the unlines function, on words.
Joins words
O(n) Joins words using single space characters.
Join given YiStrings with a space. Empty lines will be filtered out first.
The unwords function is an inverse operation to words. It joins words with separating spaces.
Flattens the stream of Array Char, after appending a separating space to each string. unwords is an inverse operation to words.
>>> Stream.fold Fold.toList $ Unicode.unwords $ Stream.fromList ["unwords", "this", "string"]
"unwords this string"
unwords = S.unwords A.read
Note that, in general
unwords . words /= id
Unfold the elements of a stream to character streams using the supplied Unfold and concat the results with a whitespace character infixed between the streams.
unwords = Stream.interpose ' '
unwords = Stream.intercalate Unfold.fromList " "
Pre-release
Like unwords.
Concatenate words together with a space. The function is meant to be a counterpart of with words. If you need to concatenate together Infinite [Char], use intercalate (pure ' ').
List version of <+>. Note that: unwords = intercalate (<+>).
Merges several Builders, separating them by spaces. Since: 2
Put spaces between elements.
>>> fmt $ unwordsF ["hello", "world"]
hello world
Of course, it works on anything Buildable:
>>> fmt $ unwordsF [1, 2]
1 2
Render lines of chunks. This puts newlines (" ") inbetween the list of chunks.