/// Append the separator to each docs items. If it is displayed in a single line, omit the last separator.
Append the separator to each docs items. If it is displayed in a single line, omit the last separator.
Append the separator to each docs items . If it is displayed in a single line omit the last separator .
pub fn concat<'a, D>(docs: D, sep: &'a str) -> RcDoc<'a>
where
    D: Iterator<Item = RcDoc<'a>> + Clone,
{
    RcDoc::intersperse(docs.clone().map(|d| d.append(sep)), RcDoc::line()).flat_alt(
        RcDoc::intersperse(docs, RcDoc::text(sep).append(RcDoc::line())),
    )
}
pub fn concat < ' a , D > ( docs : D , sep : & ' a str ) -> RcDoc < ' a > where D : Iterator < Item = RcDoc < ' a > > + Clone , { RcDoc :: intersperse ( docs . clone ( ) . map ( | d | d . append ( sep ) ) , RcDoc :: line ( ) ) . flat_alt ( RcDoc :: intersperse ( docs , RcDoc :: text ( sep ) . append ( RcDoc :: line ( ) ) ) , ) }
Append the separator to each docs items.
Append the separator to each docs items .
docs
D
sep
&'a str