News for hackers. Stuff that matters.
Re:Transducers for JavaScript by icholy on Friday October 10, 2014 @04:10PM (#8439778)
I think it only iterates over the collection once.
Re:Transducers for JavaScript by rymohr on Friday October 10, 2014 @04:36PM (#8439875)
That and they're collection agnostic. I highly recommend watching Rich Hickey's talk for more background: https://www.youtube.com/watch?v=6mTbuzafcII
Re:Transducers for JavaScript by msoad on Friday October 10, 2014 @04:53PM (#8439959)
Then what happens to operations that access the collection? like third argument in JavaScript's native forEach?
Re:Transducers for JavaScript by acjohnson55 on Friday October 10, 2014 @06:36PM (#8440395)
That's what a zipper [1] is good for. It gives you access to the rest of a collection relative to the current position.

[1] http://en.wikipedia.org/wiki/Zipper_%28data_structure%29

Re:Transducers for JavaScript by aeflash on Friday October 10, 2014 @06:11PM (#8440312)
It's not supported. But if you're doing things right, you shouldn't need it.