# Extracting function variables from a list [duplicate]

This question already has an answer here:

Evaluating the following

func[x_, y_] := x^2 + y^2

listn = {{a, b}, {c, d}, {e, f}};
Map[func[##] &, listn, {1}]


yields

{func[{a, b}], func[{c, d}], func[{e, f}]}

What I want to end up with is

{func[a, b], func[c, d], func[e, f]}

How do I do this?

-

## marked as duplicate by Mr.Wizard♦Jul 5 '13 at 6:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 1 Answer

Use Apply at level 1 i.e @@@, like this

func[x_, y_] := x^2 + y^2
listn = {{a, b}, {c, d}, {e, f}};


Then

func @@@ listn


This gives:

{a^2 + b^2, c^2 + d^2, e^2 + f^2}.

Which is equivalent to

{func[a,b], func[c,d], func[e,f]}

-
+1 Many thanks! –  geordie Jul 5 '13 at 3:20