concept new value in category functional programming
appears as: new value, new value

This is an excerpt from Manning's book Grokking Functional Programming.
We solved the problem by copying the incoming list and working only on the copied version inside the function. This way we made sure that the users of the function wouldn’t be surprised.