How to add Optional Sequence
Default
is another way to specify optional arguments, which allows for this:
Default[f, 2] = Sequence[1, 2, 3]
f[x_, y_.] := {x, y}
f[1, 2]
{1, 2}
f[1]
{1, 1, 2, 3}
f[x_, y_] := {x, y}
f[x_] := {x, Sequence[1, 2, 3]}
Apart from C.E great answer, the specific answer to this question is something like this:
ClearAll[f];
f[x_, y_: Hold[1, 2, 3]] := {x, ReleaseHold@ y}
f[a, 2 + 3]
(*{w,5}*)
f[a]
(*{a, 1, 2, 3}*)