Function flatten_one

Source
fn flatten_one<I: IntoIterator<IntoIter: OneShot>, Acc>(
    fold: impl FnMut(Acc, I::Item) -> Acc,
) -> impl FnMut(Acc, I) -> Acc