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

"myFunction(item) for item in array" is a list comprehension a lot of languages have ... among them python and haskell. It's really nothing special.

Hell, it's very similar to how "map" works in most functional languages -> "map function items"



I can see how map works. It could even be done in JavaScript: map(myFunction, items);

"myFunction(item) for item in array" looks like "call myFunction on "item", which is not yet defined... oh now it is." It's backwards.




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

Search: