3 ms·
I think it only iterates over the collection once.
by icholy 12y ago
I think it only iterates over the collection once.
- rymohr 12y agoThat and they're collection agnostic. I highly recommend watching Rich Hickey's talk for more background: https://www.youtube.com/watch?v=6mTbuzafcII https://www.youtube.com/watch?v=6mTbuzafcII
- msoad 12y agoThen what happens to operations that access the collection? like third argument in JavaScript's native forEach?
- aeflash 12y agoIt's not supported. But if you're doing things right, you shouldn't need it.
- acjohnson55 12y agoThat'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 http://en.wikipedia.org/wiki/Zipper_%28data_structure%29