Skip to main content
2 of 2
deleted 77 characters in body; edited tags
rm -rf
  • 89.3k
  • 21
  • 297
  • 479

Difference between @ and @@

I am confused by the commands @ and @@. From the documentation, I learnt that @@ is the function Apply. However, if I input Cos@@5 the output is 5, while if I input Cos@5, I get Cos[5]. By this it seems that @ rather than @@ has the function of "apply".

When I tried the function Plus, Plus@@{1,2} gave me 3 as desired, while Plus@{1,2} just gave me {1,2}. Could anyone help me with the difference (or relation) between @ and @@?

user10568