Should `goog.array.map` be used here?