On Mon, Feb 6, 2017 at 9:47 AM, Gil Tayar <[email protected]> wrote: > Forgive me if I'm wrong, but the double-for comprehension (e.g. [for (i of > numbers) for (j of letters) i + j]) can't be easily expressed in JS because > there's no flatMap.
Correct. (Which is why we need to add it.) Aside: double-for in array comprehensions is only Pythonic in very simple cases; it's usually quite hard to read. The functional version is somewhat better imo: numbers.flatMap(i => letters.map(j => i+j)); ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

