Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jules
on May 8, 2012
|
parent
|
context
|
favorite
| on:
Rich Hickey: Reducers - A Library And Model For Co...
If you use a mapped reducible twice, does that evaluate the function on each element twice?
mquander
on May 8, 2012
[–]
If you call reduce on it twice, then sure, it would do all the work twice.
loumf
on May 8, 2012
|
parent
[–]
Jules's point is that the map is done twice, which it is. If you don't want that, you can reduce into a collection and then reduce the collection twice.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: