pub fn v_concat<C: Cost>(xs: impl IntoIterator<Item = Doc<C>>) -> Doc<C>Expand description
Concatenates several documents vertically.
Equivalent to calling v_append successively to combine the documents
in the iterator. If the iterator is empty, it returns text("").
ยงExample
let doc = v_concat([text("hello"), text("my"), text("friend")]);
assert_eq!(doc.to_string(),
r"hello
my
friend");
let doc = v_concat([]);
assert_eq!(doc.to_string(), "");