O'Reilly logo

Clojure High Performance Programming by Shantanu Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Persistent data structures

As we've noticed in the previous section, Clojure's data structures are not only immutable, but can also produce new values without impacting the old version. Operations produce these new values in such a way that old values remain accessible; the new version is produced in compliance with the complexity guarantees of that data structure and both the old and new versions continue to meet the complexity guarantees. The operations can be recursively applied to nested data structures and can still meet the complexity guarantees. Such immutable data structures as the ones provided by Clojure are called persistent data structures. They are persistent in that when a new version is created, both the old and new versions persist ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required