I want [Promise [a]] -> Promise [a]
I'm with you that flatten should always be `flatMap(id)`. FWIW, `Array.prototype.flat` lets you pass a depth, but it defaults to 1 so other than the hole thing it is identical to `flatMap(id)`
-
-
Wow I really thought I was done being surprised by weird random shit in JSpic.twitter.com/Sja5Kj2S7k
-
Have you seen how an array’s length property is defined? https://www.ecma-international.org/ecma-262/5.1/#sec-15.4 … tl;dr it looks at properties on the object, determines which are array indexes, adds one to the largest, and bam, length.
- 7 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.