Operator precedence: Difference between revisions
Content added Content deleted
Jazzedpineda (talk | contribs) |
(Add few more useful operators and get rid of commas which hurt readability) |
||
Line 1,305: | Line 1,305: | ||
! style="text-align: left" | Associativity |
! style="text-align: left" | Associativity |
||
|- |
|- |
||
! |
! 10 |
||
<small>highest</small> |
<small>highest</small> |
||
| <code>f x</code> |
|||
| Function application |
|||
| Left |
|||
⚫ | |||
! 9 |
|||
| <code>.</code> |
| <code>.</code> |
||
| Function composition |
| Function composition |
||
Line 1,312: | Line 1,317: | ||
|- |
|- |
||
! 8 |
! 8 |
||
| <code>^ |
| <code>^ ^^ **</code> |
||
| Power |
| Power |
||
| Right |
| Right |
||
|- |
|- |
||
! 7 |
! 7 |
||
| <code>* |
| <code>* / `quot` `rem` `div` `mod`</code> |
||
| |
| |
||
| Left |
| Left |
||
|- |
|- |
||
! 6 |
! 6 |
||
| <code>+ |
| <code>+ -</code> |
||
| |
| |
||
| Left |
| Left |
||
|- |
|- |
||
! 5 |
! 5 |
||
| <code>:</code> |
| <code>: ++</code> |
||
| Append to list |
| Append to list |
||
| Right |
| Right |
||
|- |
|- |
||
! 4 |
! 4 |
||
| <code>== |
| <code>== /= < <= >= > </code> |
||
| Comparisons |
|||
| Compare-operators |
|||
| |
| |
||
|- |
|||
! 4 |
|||
| <code><*> <$> </code> |
|||
| Functor ops |
|||
| Left |
|||
|- |
|- |
||
! 3 |
! 3 |
||
Line 1,347: | Line 1,357: | ||
|- |
|- |
||
! 1 |
! 1 |
||
| <code>>> |
| <code>>> >>=</code> |
||
| Monadic ops |
|||
⚫ | |||
| Left |
| Left |
||
|- |
|- |
||
! 1 |
! 1 |
||
| <code>=<<</code> |
| <code>=<< <|> </code> |
||
| |
| |
||
| Right |
| Right |
||
|- |
|- |
||
! 0 |
! 0 |
||
| <code>$ |
| <code>$ $! `seq`</code> |
||
| |
| |
||
| Right |
| Right |