One thing I never fully understood was how can immutable types in purely-functional languages be performant at all. They can't possibly rely on copying all the time to remain "immutable", right? So what is the trick?
Discussion
This a good write up of how Clojure does it https://hypirion.com/musings/understanding-persistent-vector-pt-1
Or listen to the man himself. His talks are good. https://youtu.be/toD45DtVCFM
Thank you for the answers. If I could I would zap you all.
Also would be nice to be able to "merge threads" by making a note that replies to multiple notes at once. Would be useful in this case. Instead I am forced to just reply to myself.