I'm having trouble deciphering why the following couple of expressions evaluate the way they do.


This returns the first value of a list. Why? Naïvely I would have expected this to replace the head of the list with the list itself.

1 ## &@@

This multiplies a list together, like


Why is that? I imagine it's for the same reason as the first shortcut.

  • 4
    $\begingroup$ Take a look there and at linked ref pages: What the @#%^&*?! $\endgroup$
    – Kuba
    Jan 29, 2016 at 17:38
  • 2
    $\begingroup$ It does not strictly "return the first value of a list": it just returns the first argument to the function following @@, for lists, the full form is List[x,y,z], and the 1st argument is x, which is also the first value of a list. Try # & @@ func[c, b, a] $\endgroup$ Jan 29, 2016 at 17:45
  • $\begingroup$ You can also try to translate short-form expressions by wrapping them in FullForm[Hold[...]]. That displays the long form from which you can go to the help pages more easily. $\endgroup$
    – Jens
    Jan 29, 2016 at 17:51

1 Answer 1

#&@@list === First@list

because #===#1(first argument), try #2&@@{7,6,5,4}

In the second case 1 x means Times[1,x] so the expression

1 ## &@@{5,4,3,2} === Times[1,Sequence[5,4,3,2]] == Times[1,5,4,3,1]

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