I have a list of functions list
, with 1-5 elements, each of which is one of the following functions:
{f1, f2, f3, f4, f5}
I also have 2 variables a, b
. I would like to apply the functions in list
to these variables, however there is one caveat which is holding me back. f1
, f2
, and f3
take no arguments. f4
takes a
as an argument, and f5
takes a
and b
as arguments. I just want to execute all the functions in the list, not store the output in a list or anything, just execute them.
I know how to apply a list of functions to an argument but the fact that some of them take arguments and some don't has stumped me. How can I get this to work?
f3:=1
,f4[x_]:=x
andf5[x_, y_]:=x+y
? $\endgroup$