let free_vars_func bound func =
    let params = formal_vars func in
    free_vars (StringSet.union bound params) func.body