Operator precedences and associativities
precedence | left associative | right associative |
---|---|---|
9 | >> |
<< |
8 | ^ |
|
7 | * / // % |
|
6 | + − |
|
5 | ++ :: |
|
4 |
== /= < >
<= >=
*
|
|
3 | && |
|
2 | || |
|
0 | |> |
<| |
The above lists the core infix operators in descending order of precedence.
Function application (by adjacency) is higher priority than all operators and
is left-associative:
f g h x
is interpreted as ((f g) h) x
.
* The comparison operators (precedence 4) are non-associative.
This is based on Basics.elm and List.elm.