Background
There are multiple ways to define Functions. I would assume all methods are equivalent, and allow for the same options. However, I fail to find the explicit equivalent of a Function with a List as an argument.
SetDelayed on List
In particular, consider this implicit function. This allows you to fill in a list as an argument and immediate assigns variable names to the elements of the list:
func1[{a_,b_}]:=a+b
func1[{3,4}] (** 7 **)
func1[3,4] (** func1[3,4] **)
Set on Two Arguments
Now, consider this explicit function. As defined this way, the function has two arguments and cannot deal with a list.
func2=Function[{a,b},a+b];
func2[{3,4}] (** Function::fpct **)
func2[3,4] (** 7 **)
Set on List
Finally, attempt to define a new function with a list as an argument. Similar to above, we want the elements of this list to be assigned variable names directly. This does not work.
func3=Function[{{a,b}},a+b]; (** Function::flpar **)
func3[{3,4}] (** Function::flpar **)
func3[3,4] (** Function::flpar **)
My Question
Is it possible to define a Function explicitly (using the syntax fun=Function[listarg,body] as in func3) and also directly assign names to the elements? If so, what is the correct syntax / pattern?
Answer I am Not looking for
Please note that I realise there are many work-arounds, for example using With.
func4=Function[{x},With[{a=x[[1]],b=x[[2]]},a+b]];
func4[{3,4}] (** 7 **)
This is not the point of my question. I merely want to understand Mathematica syntax and patterns better.
Answer I am looking for
Why is it possible to define func1 using SetDelayed or := and make it work directly on a List, but not using the syntax of func3. Perhaps there is no clear answer. Perhaps this is just the way Mathematica works, nothing more. But perhaps I am missing some fundamental understanding of Patterns. This is where I need help.





f[x_List]=...– Ulrich Neumann Nov 05 '19 at 14:15fun=Function[listarg,body]. I call that 'explicit', perhaps there is a better name. – LBogaardt Nov 05 '19 at 14:18func[{a_,b_}]:=a+bin terms offunc=Function[{{a,b}},a+b]. However, your answer in Pure Functions with Lists as arguments provides the best self-made work-around. Am I interpreting that correctly? If so, I will indeed close this question. – LBogaardt Nov 05 '19 at 20:04Functionis not the best thing in the world - it was more like an illustration. I would still ask you to not delete the question - it can serve as a gateway to that other one, once we close it as duplicate. – Leonid Shifrin Nov 05 '19 at 20:50