On Wed, Apr 15, 2015 at 9:23 AM, monolithed <monolit...@gmail.com> wrote: > ```js > let x = [0, 1, 2]; > let y = [3, 4, 5]; > > > // Expected > [ for (i of [x, y]) ...i ]; > > > // Reality > Array.prototype.concat(...[ for (x of [x, y]) i ]); > > > // Result > [0, 1, 2, 3, 4, 5] > ``` > > Is there any discussion on this subject?
+1. Right now you can insert 1 (default) or 0 (with a filter) elements per iteration, but you can't insert 2+. This lack in Python has forced me to unwrap several comprehensions into explicit loops, which is annoying. The general solution to this is monadic, which has been inconclusively discussed in the past, but the use of the spread operator for this case is very compelling, imo. It feels *natural*. ~TJ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss