Day 1: Atoms and Persistent Data Structures
A pure functional language provides no support for mutable data whatsoever. Clojure, by contrast, is impure—it provides a number of different types of concurrency-aware mutable variables, each of which is suitable for different use cases. These, in concert with Clojure’s persistent data structures (we’ll cover what persistent means in this context later) allow us to avoid many of the problems that traditionally afflict concurrent programs with shared mutable state.
The difference between an impure functional language and an imperative language is one of emphasis. In an imperative language, variables are mutable by default and idiomatic code modifies them frequently. In an impure functional language, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access