I'd like to define a function with several optional arguments, some of which default to the value supplied for other arguments. For example, I'd like to be able to write something like
f[x_, y_: 0, z_: y] := {x, y, z}
and have
{f[1, 2], f[1]}
produce
{{1, 2, 2}, {1, 0, 0}}
Instead I get
{{1, 2, y}, {1, 0, y}}
Can I make a default for an optional argument the value of another argument? If not, what's the best approach for accomplishing this?