Shallow clones are tricky. I usually end up having to implement deep cloning when using the pattern you mentioned.
If you allow mutations, you have to deep clone. If you disallow mutations, shallow cloning is enough.
This is how libraries like list or immutable.js are so fast. They disallow mutations.
One of the advantages of FP.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.