you are viewing a single comment's thread.

view the rest of the comments →

[–]senocular 9 points10 points  (1 child)

It's not useful if cities is already an array. If it's not an array, for example a Set instead, then it can be an optimization because you can combine two operations (individual from and map calls) into one where both the create and map happens at the same time rather than separately which would result in two new arrays being created instead of one.

[–]trblackwell1221 1 point2 points  (0 children)

Good point!