O'Reilly logo
  • drew verlee thinks this is interesting:

Clojure’s persistent collections are immutable. For efficiency, adding elements via functions like conj or assoc creates a new immutable structure, but the before and after versions typically share much of their data. Because the collections are immutable, this is safe to do and much faster than copying the data. However, Clojure has a way to more efficiently fill a collection by leveraging mutability in a controlled context.

From

Cover of Clojure Applied

Note

how does this relate to structural sharing?