let apply f v = fun ~var_count -> let func = f ~var_count in let arg = v ~var_count in Tree.apply func arg