Skip to main content

singleton_or_wrap

Function singleton_or_wrap 

Source
fn singleton_or_wrap(
    parts: Vec<CompoundBody>,
    wrap: fn(Vec<CompoundBody>) -> CompoundBody,
) -> CompoundBody
Expand description

Unwrap a single-element list, otherwise wrap it with wrap.