would like Promise.flatMap to exist
If you can go `[Promise a]` to `Promise [a]` you can go `[Promise [a]]` to `Promise [[a]]` which is good enough since you can go from `[[a]]` to `[a]`
-
-
Which... Isn't helpful at all to your original tweet now that I've read it again, since `Promise.all(promises).then(Array.prototype.flat)` is a thing, and having those be more generic isn't remotely helpful for what you asked for
-
it's not necessarily that I want it to be any more generic than promises or arrays, I just have an aversion to flat() on principle unless it's essentially flatMap(id)
- 16 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.