0
$\begingroup$

This question already has an answer here:

There is something I don't understand with the notion of levels with apply.

I take this example :

Apply[f, {{a, b, c}, {d, e}}, {2}]

Mathematica answers me :

{{a, b, c}, {d, e}}

But for me it should answer me :

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

As I go to the "2" level in my list which is constituted of thoose numbers.

For example at level 1, I get :

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

Which I understand because the two elements of level 1 are : {a, b, c} and {d,e}

Where is my mistake ?

$\endgroup$

marked as duplicate by Mr.Wizard list-manipulation May 18 '17 at 16:14

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.

  • $\begingroup$ I think you want Map rather than Apply. I am going to mark this question as a duplicate. Please see the links that will be added at the top of your question. If you feel these do not answer your question please edit your question to explain this. $\endgroup$ – Mr.Wizard May 18 '17 at 16:14
  • $\begingroup$ You are Applying f to a, b etc. See what you get when you do f @@ a. It is not the same as f @ a. $\endgroup$ – Marius Ladegård Meyer May 18 '17 at 18:33

Browse other questions tagged or ask your own question.