I would like to set up the following custom notation in Mathematica 7.
This notation is not particularly useful in itself, so please do not suggest existing alternatives, or point out that this only saves a few keystrokes.
I want to know if and how it may be done.
At present, one may enter
f = #2 + #^2 / #3 & @@ # & ;
f[ {a, b, c} ]
Out[]= b + a^2 / c
Where the inner function #^2 / #3 + #2 &
is Apply
'd to the first argument.
I would like to implement the syntax
f = #2 + #^2 / #3 @@& ;
and have it behave exactly the same. That is, @@&
to represent a Function
that is automatically applied to its first argument.
It will need to have the same binding as the &
symbol.
It is preferable that this is done with the Notations
package, to whatever extent that is possible, rather than manual MakeBoxes
, for the sake of ease in setting up similar notations, even though the use of Notations
is more difficult to communicate via text.