Persistent Data Structures

Clojure’s core functionality focuses on immutable values, emphasizing the functional approach of consuming a value and returning a new, updated value. This facilitates concurrency, because the old value can be viewed by another thread without vanishing or updating unpredictably. To both approach immutability and create “new” values efficiently, these values are implemented as persistent data structures.

This idea was first fully realized by Driscoll, Sarnak, Sleator, and Tarjan in a 1986 paper Making Data Structures Persistent [DSST89] in the Journal of Computer and Systems Sciences.[78] Naturally, it drew on dozens of other sources and prior publications. The paper covered many different techniques by which persistence ...

Get Clojure Applied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.