Misunderstood scope rules?

y .+= x 

You forgot a dot. Your example creates a local variable y and binds the result of y+x to it. Using the dot modifies in place y.

4 Likes