Yup. Changing the binding of a variable never mutates the old binding. If you 
search the mailing list, you’ll find lots of threads explaining how this works 
in more detail.

Assuming x is a mutable array, you can do x[:] = x .+ 1

 — John

On May 28, 2014, at 7:07 AM, Alexander Dubbs <[email protected]> wrote:

> The following function doesn't update x when called
> 
> function v(x)
>       x = x + 1
>       return
> end

Reply via email to