let rec find_term_to_replace vinfo fa_terms =
  match fa_terms with
    | [] -> None
    | (formal,term) :: tl ->
        if vinfo.vid = formal.vid then Some term
        else find_term_to_replace vinfo tl