Re: Array Comprehensions

2017-04-16 Thread Allen Wirfs-Brock
See https://github.com/tc39/tc39-notes/blob/master/es6/2014-06/jun-5.md#generator-comprehensions-slides-plz https://speakerdeck.com/dherman/a-better-future-for-comprehensions https://github.com/tc39/tc39-notes/blob/master/es6/2014-07/jul-30.md#47-revisit-comprehension-decision-from-last-meeting

Re: Array Comprehensions

2017-04-16 Thread Herby Vojčík
Ryan Birmingham wrote: Hello all, I frequently find myself desiring a short array or generator comprehension syntax. I'm aware that there are functional ways around use of comprehension syntax, but I personally (at least) love the syntax in the ES reference

Re: Array Comprehensions

2017-04-16 Thread Cyril Auburtin
I often use ```js Array.from({length: n}, (_, i) => i**2) Array.from({length: n}, (_, i) => Array.from({length: n}, (_, j) => i*j)) [].concat(...Array.from({length: n}, (_, i) => Array.from({length: n}, (_, j) => ({i,j,v:i*j} // flattened ``` 2017-02-07 23:13 GMT+01:00 kdex :