Transducers in Clojure: Getting Started

Transducers are built upon the design princlple in Clojure of composing functions together, allowing you to elegantly abstract functional composition and create a workflow that will transform data without being tied to a specific context. So what does that actually mean and what does the code look like? Is there a transducer function or is it just extensions to existing functions. These are the questions we will explore and answer.

If you are in the early stages of learning Clojure, then I suggest getting your head around functions such as map & reduce and composing functions with the threading macros before diving into Transducers.

This is my interpretation of the really great introduction to Transducers from Clojurescript Unraveled, expanded with additional code and my own comments.

Read More