Operator precedence: Difference between revisions

Content added Content deleted
(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
|-
|-
! 9
! 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>^ ^^ **</code>
| Power
| Power
| Right
| Right
|-
|-
! 7
! 7
| <code>*,/,`quot`,`rem`,`div`,`mod`</code>
| <code>* / `quot` `rem` `div` `mod`</code>
|
|
| Left
| Left
|-
|-
! 6
! 6
| <code>+,-</code>
| <code>+ -</code>
|
|
| Left
| Left
|-
|-
! 5
! 5
| <code>:</code>
| <code>: ++</code>
| Append to list
| Append to list
| Right
| Right
|-
|-
! 4
! 4
| <code>==,/=,&lt;,&lt;=,&gt;=,&gt; </code>
| <code>== /= &lt; &lt;= &gt;= &gt; </code>
| Comparisons
| Compare-operators
|
|
|-
! 4
| <code>&lt;*&gt; &lt;$&gt; </code>
| Functor ops
| Left
|-
|-
! 3
! 3
Line 1,347: Line 1,357:
|-
|-
! 1
! 1
| <code>&gt;&gt;,&gt;&gt;=</code>
| <code>&gt;&gt; &gt;&gt;=</code>
| Monadic ops
|
| Left
| Left
|-
|-
! 1
! 1
| <code>=&lt;&lt;</code>
| <code>=&lt;&lt; &lt;&vert;&gt; </code>
|
|
| Right
| Right
|-
|-
! 0
! 0
| <code>$,$!,`seq`</code>
| <code>$ $! `seq`</code>
|
|
| Right
| Right