Suppose I define
f[x_,y_,z_]:=x+y+z
I wish to apply the Fold function to f along the lines of
Fold[f,1,2,Range[10]]
In other words, I want to fix x and y, while iterating over z. But this makes no sense as Fold will not accept more than 3 arguments. I realise that one solution to this is to redefine f as
f[{x_,y_},z_]:=x+y+z
Or something else along these lines, but I want to keep f as a function of 3 variables explicitly. Any suggestions?
f[1, 2, #] & /@ Range[10] // Total
? $\endgroup$