O'Reilly logo

Clojure Applied by Alex Miller, Ben Vandgrift

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3Processing Sequential Data

Once we have domain entities and collections of entities or values, we need to be able to answer questions or transform our data into new forms to satisfy our application requirements. Imperative languages often process collections by explicitly looping over a collection, but Clojure encourages thinking at the level of data in aggregate, applying transformations to a whole collection at once.

Rather than build an extensive set of functions that operate on a single data structure, Clojure builds all of its transformations on the sequence abstraction. Sequences are the key abstraction that connects two of the most important parts of Clojure: immutable collections and the transformation library.

By abstraction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required