4 ms·
"You count up shelf #1, I count up shelf #2." Isn't that a reduce too, though?
by vegai 15y ago
"You count up shelf #1, I count up shelf #2."
Isn't that a reduce too, though?
- rogerbraun 15y agoI think so, too, but it does not matter. The function you use on the elements in your list when doing a map can be anything, so it may even be something like counting up.
- masklinn 15y agoSure, any iterative process is implementable in terms of reduce so the mapping itself is a reduction, and each counting instance in the mapping is a reduction as well (unless you map on books rather than shelves, though that can be described as a reduction on a single-item set).
- yummyfajitas 15y agoIn my analogy, I was assuming a shelf is a single record.