by area and shading
as mentioned by CaringDev (but not explained), you will probably see that shading occurs when you make the area more obvious (using the let ... in ... #light can be shortened a bit), but you can still use he even without #light off )
Try the following:
> let a = 233 in let a = 555 in a;; val it : int = 555
as you can see, the expression expresses the shadow value of a - but the original is not lost:
> let a = 233 in (let a = 555 in a), a;; val it : int * int = (555, 233)
it's just not in the realm of internal let ... in ...
btw: you can rewrite your example to:
let fctn = let a = 123 in (let a =123 in a)
(I added parentheses to make this more obvious)
the other at the module level really defines the value for the scope of the module and is not really an expression, but a definition
source share