Same code different result in let block and begin block

In the let block the function f captures the x which is in a local scope. But in the begin block x is in global scope so the function creates a new variable unless you tell it global x = ...

3 Likes