fn done(
    args: Vec<core::RcTerm>,
    param_app_modes: Vec<AppMode>,
    body: core::RcTerm,
) -> core::RcTerm {
    let term = param_app_modes
        .into_iter()
        .rev()
        .fold(body, |acc, app_mode| {
            core::RcTerm::from(core::Term::FunIntro(app_mode, acc))
        });

    args.into_iter().fold(term, |acc, arg| {
        core::RcTerm::from(core::Term::FunElim(acc, AppMode::Explicit, arg))
    })
}
/// Finish elaborating the patterns into a case tree.
Finish elaborating the patterns into a case tree.
Finish elaborating the patterns into a case tree .
fn done(
    args: Vec<core::RcTerm>,
    param_app_modes: Vec<AppMode>,
    body: core::RcTerm,
) -> core::RcTerm {
    let term = param_app_modes
        .into_iter()
        .rev()
        .fold(body, |acc, app_mode| {
            core::RcTerm::from(core::Term::FunIntro(app_mode, acc))
        });
    args.into_iter().fold(term, |acc, arg| {
        core::RcTerm::from(core::Term::FunElim(acc, AppMode::Explicit, arg))
    })
}
fn done ( args : Vec < core :: RcTerm > , param_app_modes : Vec < AppMode > , body : core :: RcTerm , ) -> core :: RcTerm { let term = param_app_modes . into_iter ( ) . rev ( ) . fold ( body , | acc , app_mode | { core :: RcTerm :: from ( core :: Term :: FunIntro ( app_mode , acc ) ) } ) ; args . into_iter ( ) . fold ( term , | acc , arg | { core :: RcTerm :: from ( core :: Term :: FunElim ( acc , AppMode :: Explicit , arg ) ) } ) }
Finish elaborating the patterns into a case tree.
Finish elaborating the patterns into a case tree .
args
Vec<core::RcTerm>
param_app_modes
Vec<AppMode>
body
core::RcTerm