It’s important to keep in mind that there is no official version of array 
comprehensions, at the moment. So that is something to keep in mind whenever 
they are added to the language.

I’d probably implement flatMap() and use it if I ever needed to do something 
like this.

> On 15 Apr 2015, at 18:34, Tab Atkins Jr. <jackalm...@gmail.com> wrote:
> 
> On Wed, Apr 15, 2015 at 9:31 AM, Jeremy Martin <jmar...@gmail.com> wrote:
>> Why not just `[...x, ...y]`?
> 
> Obviously that's a solution to the trivial example that monolithed
> provided, but it's not a solution to the more general problem he's
> alluding to, where you're doing a comprehension and want to insert two
> or more elements into the result in a single iteration.
> 
> ~TJ
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de



_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to