Clojure atom — Independent State · swap!, reset!, deref | Episode 25
0views
C
CelesteAI
Description
Clojure is an immutable language — and yet you still need state. An atom is how Clojure holds a single value that you can change over time, safely and without locks. In this episode we build two concrete examples with the same primitive: a hit counter (an integer) and a cache (a map).