I am not familiar with Mathematica (it's been 15 years...), but Maxima does allow you to define a function that takes a variable number of arguments, viz.

f(x,[y]) := ....

then

f(a) --> x=a, y=[]

f(a,b) --> x=a,y=[b]

f(a,b,c) --> x=a,y=[b,c], etc.

Last edit: Anonymous 2014-07-28