Update nested data with assoc/update without mutation, and model state transitions as values.
Immutability becomes real when you stop thinking “how do I change this object?” and start thinking “what new value should this function produce?”
Here is the basic shape you will use constantly:
1(def order {:id 1 :status :new :items [{:sku "A" :qty 1}]})
2
3(update order :status (constantly :paid))
update, assoc, dissoc for shallow changes.update-in / assoc-in for nested structures.Java mental model: instead of “mutate a DTO”, treat state changes like producing a new immutable DTO (but without boilerplate constructors and setters).