What is Pyrsistent and how do persistent collections work?
masterPyrsistent provides a set of persistent collections (functional data structures) that are immutable.
Instead of mutating a data structure in place, all methods that would normally perform a mutation instead return a new copy of the structure containing the requested updates. The original structure remains untouched. This prevents hidden side effects and ensures that an object remains unchanged throughout its lifetime.
Pyrsistent is influenced by Clojure's persistent data structures and uses path copying to share common elements between the original and the new versions, making the creation of new versions efficient.