4 ms·
Wait! What? That's what 'transducers' means? Being new to Clojure I've been avoiding some concepts until later, but if they hadn't renamed old concepts, ie: h
by madmulita 8y ago
Wait! What? That's what 'transducers' means?
Being new to Clojure I've been avoiding some concepts until later, but if they hadn't renamed old concepts, ie: higher order functions to transducers, maybe newbies wouldn't get scared.
- andrenth 8y agoI’m not a Clojure programmer but from the example given, “transducers” would be equivalent to lazy evaluation / stream fusion. Simple HOFs wouldn’t prevent the elements to be traversed in each subsequent function call.
- the2bears 8y agoThat's not what transducers are, though. They're a "recipe" for a function composite. I'm simplifying things, but transducers compose to form a function that then executes against each element in the collection passed in. The main difference is that no intermediary data collections are created. There's more, and it's worth reading up on them.