A persistent data structure is an immutable collection: an update produces a new value while preserving the prior version. This behavior gives Clojure a practical foundation for sharing data safely, including concurrent programs that avoid explicit locking by default. section 14.0 section 9.1.1
Persistent collections make several guarantees visible in everyday Clojure code:
- Operations return collection values rather than requiring in-place mutation; earlier values remain available. section 9.1.1 section 16.13
- Different collection types retain their own contracts: array-map preserves insertion order during iteration, while remaining associative like hash-map. section 11.1.2
- Persistent values can be shared across concurrent computations without making every ordinary update an explicit locking operation. section 14.0
An update preserves the original map
(def original (array-map :a 1 :b 2)) (def updated (assoc original :c 3)) original ; => {:a 1, :b 2} updated ; => {:a 1, :b 2, :c 3} (array-map :a 1 :b 2) ; insertion order is retained during iteration section 11.1.2


