This may be a very newbie question, but I didn’t find the answer.
I need to store, for example a list and later replace it with another, under the same pointer.
This may be a very newbie question, but I didn’t find the answer. I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It can be done via references:
You do not see references very often because you can do the same thing using immutable values inside recursion or high-order functions:
Side-effect free solutions are preferred since they are easier to reason about and easier to ensure correctness.