Operator Precedence
...describes the nesting order of compound expressions of different operator types.
Operator Associativity
...describes the nesting order of compound expressions with the same operator precedence
Why are logical operators in JavaScript left associative? - http://stackoverflow.com/questions/20591876/why-are-logical-operators-in-javascript-left-associative/20754697#20754697
"Associativity, like precedence, is not about what evaluates first, it is about how the expression is parsed."
The distinction between parsing and evaluation is important.
Finally, the function application "operator" (i.e., the space between arguments in a function call) associates to the left, while the function type-mapping infix operator in a function definition (i.e. -> ) associates to the right. And "associates to the right/left" means "the things on that side are parsed, (not evaluated), first".
https://www.haskell.org/tutorial/functions.html
From the first section of that tutorial page:
First, consider this definition of a function which adds its two arguments:
add :: Integer -> Integer -> Integer
add x y = x + y
An application of add has the form
add e1 e2
, and is equivalent to(add e1) e2
, since function application associates to the left. In other words, applying add to one argument yields a new function which is then applied to the second argument. This is consistent with the type ofadd
,Integer->Integer->Integer
, which is equivalent toInteger->(Integer->Integer)
; i.e. -> associates to the right.