0

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 ?

StarBucK
  • 2,164
  • 1
  • 10
  • 33
  • 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. – Mr.Wizard May 18 '17 at 16:14
  • 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. – Marius Ladegård Meyer May 18 '17 at 18:33

0 Answers0