I have seen several related questions, but none seems to address specifically this.
I would like to define a command that accepts a variable number of arguments. Something like
So that if there is a parameter the output will be
f(#1) and if there is no parameter the output will be
f, and never
Is this possible?