On Sun, Jul 10, 2011 at 7:09 AM, Dmitry A. Soshnikov
<dmitry.soshni...@gmail.com> wrote:
>> If I hadn't made map skip holes, then the fill pattern would be simple
>> enough:
>>
>> Array(4).map(function (_,x) x * x);
>>
>
> It's in particular case, you try to multiply indices, which in current
> implementation of `map` anyway gives unfortunately nothing.

Yes, as I said it *would* work if map had been specified not to skip holes:

js> [undefined,undefined,undefined,undefined].map(function(_,x)x*x)
[0, 1, 4, 9]

Is that not what you want?

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

Reply via email to