This question already has an answer here:
Assuming variable x is a long list, which needs 1GB memory to store.
I want to modify x in a function, such as let x[]=1, using
but when I call the funtion f, it will take extra 1GB memory. How can I in-situ modify x in function f without extra memory?