Say I have a function with one mandatory and two optional arguments,
f[x_, y_ : 1, z_ : 2] := x^2 + y*z
Then how can I make a function call which gives values to both x
and z
, but not to y
, such that y
takes its default value. In Python I could call f[2, z=1]
for example. What is the equivalent in Mathematica?