MyFunc[x_] := x + y
Block[{y = 1}, MyFunc[1]]
现在,如果我想将
2
保存到变量中,该怎么办
{y = 1}
var = {y = 1}; Block[var, MyFunc[1]]
,但无法使其起作用。
Hold