arliss_obsidian/fp/Language/Infix Operators/Associativity.md
Orion Kindel 3701b1e2f8
update
2024-09-23 18:56:55 -05:00

419 B

Infix Operators are left-, right- or non-associative (infixl, infixr, infix respectively)

When multiple infix operators with the same associativity & precedence are chained, associativity tells the language how to group the expressions.

e.g. && is right-associative, while * is left associative:


a && b && c
-- interpreted as 
(a && (b && c))

a * b * c
-- interpreted as
((a * b) * c)