Looking at the Operator Precedence table, I'm confused by where lambda expressions fit in to all of this. Numbering the table 1 to 25 (lowest to highest precedence), I see the two key tokens used for composing lambda expressions: fun is non-associative 6, and -> is right-associative 8. That is, fun ... -> .... This might be my first mistake in understanding, since I'm not even sure if precedence plays a role in the body of a lambda expression (the right hand side of ->) I can only think of precedence playing a role in the entire expression, so I'll move on to there. According to this table, the sequence operator, ;, has lower precedence, 4, than the fun "operator". Which I believe says that
fun (x:int) -> x + 3 ; 2;;
should be equivalent to
((fun (x:int) -> (x + 3)) ; 2);;
yet it is actually equivalent to
(fun (x:int) -> (x + 3 ; 2));;
I appreciate any help clarifying my interpretation of the rules of precedence given by the referenced table vs. the actual rules of precedence for lambda expressions! Thanks!