tc39 / proposal-collection-methods

https://tc39.github.io/proposal-collection-methods/
Other
172 stars 8 forks source link

Set.prototype.{ flatMap, flat } #34

Open zloirock opened 5 years ago

zloirock commented 5 years ago

So, flatMap and flat are added to Array in ES2019. In which form they should be added to this proposal? What they should flatten - sets, arrays, iterables?

zloirock commented 4 years ago

Makes sense to see iterators .flatMap semantic https://tc39.es/proposal-iterator-helpers/#sec-iteratorprototype-flatmap.

Ginden commented 2 months ago

I'm not sure if there is any intuitive semantics for Map.prototype.flatMap and Map.prototype.flat. Set.prototype.flatMap is quite obvious, I will add it.