I'm a big fan of Mathematica's shorthand notation, things like @ and /@, which I use the most. It's really useful when I'm quickly whipping something up.
However, something has always driven me a bit nuts. If I want to first map a function to each element in a list, and then apply another function to the whole list, like this:
In[338]:= a = {2, 8, 5};
SecondFn@FirstFn /@ a
Out[339]= {SecondFn[FirstFn][2], SecondFn[FirstFn][8],
SecondFn[FirstFn][5]}
You can see that it's first applying SecondFn to FirstFn, and then mapping that combination of functions to each element. I get that by default @ apparently takes precedent in the order of operations over /@, but is there an easy way to make it still go from "right to left" without using parentheses?
For example, I know I can do this to get the result I want:
In[340]:= a = {2, 8, 5};
SecondFn@(FirstFn /@ a)
Out[341]= SecondFn[{FirstFn[2], FirstFn[8], FirstFn[5]}]
But at that point I have to put a pair of parentheses, at which point I might as well just use brackets like normal (in fact it contains the extra symbol @).
Is there a way to do this? thanks!