Skip to content

Instantly share code, notes, and snippets.

@srang992
Created November 20, 2022 15:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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