Problem 6.11 squareEach as a
function. The exercise asks you to write squareEach by modifying the
list parameter input to the function. This example shows the alternative
of using a pure function to return a distinct list without modifying the
input list (no side effect).