Based on the anwser of "Meaning of keyword “in” in F#":
let (x = 2 and y = x + 2) in
y + x
This will not work the same as
let (x = 2 and y = x + 2)
y + x
In the former case x
is only bound after the in
keyword. In the later case normal variable scoping rules take effect, so variables are bound as soon as they are declared.
When one need to specify bound variables with in
, instead of binding as they are declared?