pub fn extract_terms<C: FoldingConfig>(
    exp: FoldingExp<C>
) -> Box<dyn Iterator<Item = Term<C>>>