Chapter 2Collect and Organize Your Data

Clojure collections are the primary means of aggregating data in Clojure and are used at all levels of a Clojure application. In this chapter we’ll be focusing on how to use collections both within and around our domain model to create, update, and access our application data.

We’ll begin with the basics of choosing and creating the right kind of collection for different needs. This choice is primarily driven by how we expect to use the collection after it’s created.

In a number of cases we can use specialized collections or functions to update larger chunks of our collections at a time. We’ll also look at some concerns about accessing the data in maps or finding items in sequential data.

We’ll finish ...

Get Clojure Applied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.