有時我蠢 要人地解點解要整新功能 去解決緊咩問題 之 map/reduce in js for play with json/data

https://rangle.io/blog/map-reducing-the-pain-of-dealing-with-arrays/

map: But it’s not really a way of dealing with arrays. It’s about mapping one value into a new value, and getting the same type back.

So the takeaway is that you don’t have to care if map loops or not, or how it loops, or in some languages how many threads it uses. If you are using a map method on an array, or on a library Promise or Observable, or anything else, it will do what it has to do to transform the value(s), and give you back the same type, so that you can keep calling map on the result.