non-mutating function
nounUK /nɒn mjuːˈteɪtɪŋ ˈfʌŋkʃən/
US /nɑːn ˈmjuːteɪtɪŋ ˈfʌŋkʃən/
A non-mutating function is a function that does not change the things you give it.
The sort function in that library is non-mutating, so your original list stays the same.
OTHER MEANINGS
2. A function that returns a new value instead of altering its input.
Using a non-mutating function, she got a new array and kept the old one.
3. A routine that leaves shared data untouched so other code can rely on it.
Because it is a non-mutating function, it is safe to call from many places at once.
4. A method that avoids changing the object it belongs to.
The non-mutating function on the string returned an uppercase copy.