fn plan_junction<J: BlahJunction>(subterms: &[Predicate], analysis: &StaticAnalysis) -> PlanOrTrivial {
    let mut plans = Vec::new();
    for pot in subterms.iter().map(|subterm| plan_predicate(subterm, analysis)) {
        match pot {
            PlanOrTrivial::Plan(plan) => {
                plans.push(plan);
            }
            PlanOrTrivial::Trivial(k) => {
                if k == !J::CONSONANT {
                    return PlanOrTrivial::Trivial(!J::CONSONANT);
                }
            }
        }
    }

    if plans.is_empty() {
        PlanOrTrivial::Trivial(J::CONSONANT)
    } else {
        PlanOrTrivial::Plan(J::construct(plans))
    }
}
/// Plan a `BlahJunction` predicate with the given `subterms`.
Plan a `BlahJunction` predicate with the given `subterms`.
Plan a ` BlahJunction ` predicate with the given ` subterms ` .
fn plan_junction<J: BlahJunction>(subterms: &[Predicate], analysis: &StaticAnalysis) -> PlanOrTrivial {
    let mut plans = Vec::new();
    for pot in subterms.iter().map(|subterm| plan_predicate(subterm, analysis)) {
        match pot {
            PlanOrTrivial::Plan(plan) => {
                plans.push(plan);
            }
            PlanOrTrivial::Trivial(k) => {
                if k == !J::CONSONANT {
                    return PlanOrTrivial::Trivial(!J::CONSONANT);
                }
            }
        }
    }
    if plans.is_empty() {
        PlanOrTrivial::Trivial(J::CONSONANT)
    } else {
        PlanOrTrivial::Plan(J::construct(plans))
    }
}
fn plan_junction < J : BlahJunction > ( subterms : & [ Predicate ] , analysis : & StaticAnalysis ) -> PlanOrTrivial { let mut plans = Vec :: new ( ) ; for pot in subterms . iter ( ) . map ( | subterm | plan_predicate ( subterm , analysis ) ) { match pot { PlanOrTrivial :: Plan ( plan ) => { plans . push ( plan ) ; } PlanOrTrivial :: Trivial ( k ) => { if k == ! J :: CONSONANT { return PlanOrTrivial :: Trivial ( ! J :: CONSONANT ) ; } } } } if plans . is_empty ( ) { PlanOrTrivial :: Trivial ( J :: CONSONANT ) } else { PlanOrTrivial :: Plan ( J :: construct ( plans ) ) } }
Plan a `BlahJunction` predicate with the given `subterms`.
Plan a ` BlahJunction ` predicate with the given ` subterms ` .
subterms
&[Predicate]
analysis
&StaticAnalysis
subterms
&[Predicate]
analysis
&StaticAnalysis