If I say an operation is left-associative, is that equivalent to saying it "associates from the left" and "associates to the right"?
My confusion comes from an example in my functional programming Haskell textbook. It states:
Function application associates to the left. e.g. mult x y z
means ((mult x)y)z
. i.e. mult
takes an integer x
, returns a function mult x
, which takes an integer y
, and returns a function mult x y
, which takes an integer z
and returns the result of x*y*z
.
But if I say it "associates to the left", I think of it being right-associative, i.e. evaluation starts from the right and to the left. However, since evaluation of mult
starts from the left and to the right, is this left-associative? Should the author have said function application "associates to the right"? Or am I missing something and the author is correct?