Suppose I have a bunch of functions such as
g(x0,x1,x2,x3,x4) := x0+x1+x2+x3+x4+x5
. I would like to use them in other expressions, but explicitly enumerating all the variables x0,...,x4
is cumbersome. How to shorthand it? I tried something like vars : [x0,x1,..,x4]
and then passing it like so g(vars)
, but of course vars
is considered as a single argument in this case, and I get an error. What I need to do?
EDIT: I was asking for something tad simpler. In my case, the answer would be
something like "create aliases", G1 : g1(x0,...,x4)
etc kind of thing.
But the answer below highlights a useful thing to know.