Is my understanding of transducers correct?
问题 Let's start with a definition: A transducer is a function that takes a reducer function and returns a reducer function. A reducer is a binary function that takes an accumulator and a value and returns an accumulator. A reducer can be executed with a reduce function (note: all function are curried but I've cat out this as well as definitions for pipe and compose for the sake of readability - you can see them in live demo): const reduce = (reducer, init, data) => { let result = init; for (const