Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
icholy
on Oct 10, 2014
|
parent
|
context
|
favorite
| on:
Transducers for JavaScript
I think it only iterates over the collection once.
rymohr
on Oct 10, 2014
|
next
[–]
That and they're collection agnostic. I highly recommend watching Rich Hickey's talk for more background:
https://www.youtube.com/watch?v=6mTbuzafcII
msoad
on Oct 10, 2014
|
prev
[–]
Then what happens to operations that access the collection? like third argument in JavaScript's native forEach?
acjohnson55
on Oct 10, 2014
|
parent
|
next
[–]
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
aeflash
on Oct 10, 2014
|
parent
|
prev
[–]
It's not supported. But if you're doing things right, you shouldn't need it.
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: