Shorthand syntax provides an alternate way to apply functions and, in many cases, improves readability. A simple example would be
In[1]:= numList = {1, 0, 1, 1, 0, 1, 1};
In[2]:= FromDigits@numList
Out[2]:= 1011011
instead of
In[3]:= FromDigits[numList]
Out[3]:= 1011011
Here, the syntax is simply <function> @ <argument>
. (There is also the weaker suffix <argument> // <function>
.) For lists, more sophisticated methods of applying functions exist (Map
, Apply
, etc), some with their own shorthands (/@
, @@
).
Many built-in functions accept parameters and options in addition to arguments. For example, one can specify which base to use for FromDigits
:
In[4]:= FromDigits[numList, 2]
Out[4]:= 91
How do you incorporate function parameters/options into shorthand syntax?
EDIT: After more searching of Mathematica Stack Exchange, I found this answer by Brett Champion to this question. I believe it answers my question.