:: [String] -> String package:xmonad-contrib

Appends a \n character to each input string, then concatenates the results. Equivalent to foldMap (s -> s ++ "\n").

Examples

>>> unlines ["Hello", "World", "!"]
"Hello\nWorld\n!\n"
Note that unlines . lines /= id when the input is not \n-terminated:
>>> unlines . lines $ "foo\nbar"
"foo\nbar\n"
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"
Wrap the given commands in a progn. The given commands need not be wrapped in parentheses (but can); this will be done by the function. For example:
>>> progn [require "this-lib", "function-from-this-lib arg", "(other-function arg2)"]
"(progn (require (quote this-lib)) (function-from-this-lib arg) (other-function arg2))"
Make a list of the given inputs.
>>> list ["foo", "bar", "baz", "qux"]
"(list foo bar baz qux)"
Like progn, but with save-excursion.
>>> saveExcursion [require "this-lib", "function-from-this-lib arg", "(other-function arg2)"]
"(save-excursion (require (quote this-lib)) (function-from-this-lib arg) (other-function arg2))"