Persistent Data Structure
Noun · Development
Definitions
A data structure that preserves all previous versions of itself when modified, returning a new version that shares most of its structure with the old one (structural sharing) rather than mutating in place. Clojure's vectors and maps, and Immutable.js collections, are canonical examples.
In plain English: A data structure that never changes its existing data; instead, updates create a new version while efficiently reusing most of the old one.
Example: "Because the map is persistent, undo is trivial — we just keep a reference to the previous version and swap back to it."