tc39 / proposal-flatMap

proposal for flatten and flatMap on arrays
https://tc39.github.io/proposal-flatMap
214 stars 19 forks source link

flatMap should not recursively flatten result #2

Closed bterlson closed 8 years ago

bterlson commented 8 years ago

[[1,2],[3,[4,5]]].flatMap(n => n) === [1,2,3,[4,5]]

ljharb commented 7 years ago

@bterlson should flatMap take a "depth" argument, like flatten?