pub fn fold( xs: &[impl Format], op: impl FnMut(Document, Document) -> Document, ) -> Document
Collapses a list of documents according to op. If the slice is empty, returns nil.
op
57 fn sep(xs: &[impl Format], sep: &str) -> Document { 58 fold(xs, |lhs, rhs| lhs & text(sep) + rhs) 59 }