fn is_fusable_expr(expr: &Expr) -> bool {
    if let Some(rfa) = ResForAppender::extract(expr) {
        if rfa.iters.iter().all(|ref i| i.is_simple()) && MergeSingle::extract(&rfa.func).is_some()
        {
            return true;
        }
    }
    false
}
Checks whether a For loop is simple enough to be fused.
weld/src/optimizer/transforms/loop_fusion_2.rs