Wrapping Up

Clojure collections provide the immutable base for Clojure data, and sequences provide a key abstraction over both collections and any other sequentially traversable data source. We’ve shown the most common means of processing sequential data using both sequence functions and transducers.

Transducers gain better performance and more reusabilility by splitting the sequence-processing model into source iteration, transformation, and output processing such that they can be altered independently. You saw the use of sequence, into, and transduce as three common means of applying transducers to an input source. In future chapters we’ll also show how to apply these same transducer functions in core.async channels.

Now that we’ve modeled ...

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.