In this course, we will go through the concept of transducers and build them up from basic principles. We will go over the problems with regular composed transformations, and show how we end up with unnecessary data and intermediate collections. We go on to learn how we can use transducers for performance gains when operating on large data sets, as well as how they’re an excellent fit for processing other iterable data, like generators. Not just arrays.
Overview
Syllabus
- Understand why Transducers can Improve Performance
- Write Reducers for Different Data Types
- Understand Transformer Functions
- Rewrite Map and Filter as Reducers
- Create Map and Filter Transducers
- Improve Composition with the Compose Combinator
- Transduce over any Iteratable Collection
- Make an Into Helper to Remove Boilerplate and Simplify our Transduce API
- Transduce When the Collection Type is an Object
- Create a Sequence Helper to Transduce Without Changing Collection Types
- Add the Transducer Protocol to Support Arbitrary Data Types as our Target Collections
- Measure the Performance of our Transducers
- Use Transducers in Production
Taught by
Paul Frend