Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> map('x*x', [1,2,3,4])

Although it's longer, I think I prefer:

map([1,2,3,4], function (num){

return num + 1;

});

.. which is how our in-house functional javascript library does it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: