Skip to Content
Clojure Applied
book

Clojure Applied

by Ben Vandgrift, Alex Miller
August 2015
Intermediate to advanced
220 pages
5h 53m
English
Pragmatic Bookshelf
Content preview from Clojure Applied

Modeling a Change

Recall that Clojure’s focus is on immutable values. With immutable data, an “update” produces a new instance of an entity (or collection of entities), rather than updating the entity or entities in place. In most cases, this will serve your purposes admirably. Occasionally, you’ll need to model the changes in the application’s world, to track changes in data. Specifically, you want to hold onto a reference to a set of data that changes.

In a multithreaded scenario, updating data in place introduces a lot of complex questions. Who can change the data? How do other threads get notified of the change? Which process wins when multiple simultaneous updates are happening? Clojure provides elegant answers to all of these questions ...

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.
Start your free trial

You might also like

Clojure Programming

Clojure Programming

Chas Emerick, Brian Carper, Christophe Grand
Living Clojure

Living Clojure

Carin Meier
Clojure Cookbook

Clojure Cookbook

Ryan Neufeld, Luke VanderHart

Publisher Resources

ISBN: 9781680501476Errata Page