Transducers for dummies

To be very honest, the first time transducers were presented, like a few other things by Rich Hickey, creator of Clojure, it felt like it was ahead of its time. Just even understanding the concepts was quite a task, never mind using them.

In this recipe, we will slowly look at how to use a transduce call, from the very first baby steps to some more pragmatic examples.

We will also go through the different terms used when dealing with transducers. Finally, we will also see how to apply parallelism to transducers using core.async.

So relax, grab a bit of coffee, and let's get ready.

Getting ready

If you remember the into function, you will remember that it takes all the elements from one collection and puts them in a different ...

Get Clojure Programming Cookbook 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.