tweak is_function; formals generation