Skip to main content
11 votes

Table of precedence values for all System` symbols

You can use Precedence to get the precedence for a symbol. The following code produces an association with precedences as keys, and symbol names corresponding to ...
Carl Woll's user avatar
  • 132k
11 votes
Accepted

How exactly does Postfix notation work?

I would have expected this to either be the same as (a // f) /.a ->1, or as applying the replacement rule first and then the function ...
Szabolcs's user avatar
  • 236k
10 votes
Accepted

Change Operator Precedence of --> operator

How about overloading the LongRightArrow with a special rule for Part[...] as the second argument? ...
LLlAMnYP's user avatar
  • 11.5k
9 votes

i_:0|1 varies in v12.1: incompatible change or bug?

I expect that this was a bugfix that corrected an inconsistency between how the Front End and the kernel parse this code. Here's a comparison from M12.0.0: ...
Szabolcs's user avatar
  • 236k
8 votes

Which operators are missing from the official precedence table?

Finding All Operators and Their Precedence, Arity, Affix, and Associativity Sources of Information There are a few different sources of information about operators and their properties. I list all ...
Robert Jacobson's user avatar
8 votes

Which operators are missing from the official precedence table?

We can read the Front End resource as I did for List of symbols without built-in meaning. UnicodeCharacters.tr itself contains the parsing precedence information, ...
Mr.Wizard's user avatar
  • 273k
8 votes

Change Operator Precedence of --> operator

You could give LongRightArrow a HoldRest attribute and manipulate the right hand side. Perhaps something like: ...
Greg Hurst's user avatar
  • 36.8k
7 votes
Accepted

Why Divide does not give the same answer?

First, since the precedence of Divide is higher than Times, you should expect to parse ...
Carl Woll's user avatar
  • 132k
7 votes

i_:0|1 varies in v12.1: incompatible change or bug?

I think V. 12.1.1 is correct, because the precedence of Alternatives (|) is larger than that of Optional (:) ...
Αλέξανδρος Ζεγγ's user avatar
6 votes
Accepted

Forcing Explicit Parentheses in Traditional Form

Precedence /@ {Cross, CenterDot} {500., 410.} You can wrap Cross[..] with PrecedenceForm ...
kglr's user avatar
  • 401k
6 votes

Change Operator Precedence of --> operator

The precedence of LongRightArrow is predetermined as shown in the operator table. You can attempt to circumvent the problem as other answers show but these do not change the binding power of the ...
Mr.Wizard's user avatar
  • 273k
5 votes

Change Operator Precedence of --> operator

If you don't mind mucking with the internal file UnicodeCharacters.tr (make a copy first!) you can change the line: ...
Carl Woll's user avatar
  • 132k
4 votes

Prefix operator with low precedence

This doesn't really answer your question, but perhaps the introduction of operator forms like Map[f] in M10, as well as a new short form for ...
Carl Woll's user avatar
  • 132k
4 votes
Accepted

Simplify Map on a list of lists

You are mistaken the precedence of the operators. See here. The way you are writing your expression is not what you expect. You are asking Mathematica to Simplify ...
rhermans's user avatar
  • 37.4k
3 votes
Accepted

Operator Precedence in Notation Package

You need to add an input alias for the TagBox version of the long right arrow: ...
Carl Woll's user avatar
  • 132k
3 votes

Table of precedence values for all System` symbols

Following up Robert Jacobson's comment to Carl Woll's answer while using Andrew Steinacher's NiceGrid from the FunctionRepository, the following yields a less ...
Ronald Monson's user avatar
3 votes

Prefix operator with low precedence

Update An even simpler alternative is to use a TemplateBox so that an additional MakeExpression rules is not needed (as in my ...
Carl Woll's user avatar
  • 132k
2 votes

PrecedenceForm with Format

I think you're looking for SyntaxForm. For example: ...
Carl Woll's user avatar
  • 132k
2 votes

when is f@g not the same as f[g]?

I was making a custom typesetting form (MakeBoxes[] et al.), and happened to notice that Precedence[] works on box forms. This ...
Sean's user avatar
  • 645
1 vote
Accepted

Finding a list of results of an arithmetic operation with a permutations of precendence

...
kglr's user avatar
  • 401k

Only top scored, non community-wiki answers of a minimum length are eligible