Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}]


{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?

share|improve this question

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.

up vote 1 down vote accepted

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

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


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]}

share|improve this answer
+1 Many thanks! – geordie Jul 5 '13 at 3:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.