I wrote function scale(v); v = v .* 2; end and expected the caller's array to be doubled, but it is unchanged after the call. On the other hand, push!(v, 1.0) and sort!(v) inside a function do change the caller's array.
What does the exclamation mark actually do, and what decides whether a function modifies the array I pass in or works on a copy?




