Skip to content

Instantly share code, notes, and snippets.

@srang992
Created November 20, 2022 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srang992/5139c1eaf8c9b269e0830138234576bc to your computer and use it in GitHub Desktop.
Save srang992/5139c1eaf8c9b269e0830138234576bc to your computer and use it in GitHub Desktop.
function minus_one!(x)
x .= x .+ 1
end
K = [1, 2, 3, 4, 5]
modify_array!(K)
println(K)
# it will print [2, 3, 4, 5, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment