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

It's just a way of getting rid of the redundant "function()" syntax. Unfortunately with bind(), we have to set the scope even though it isn't always necessary. So in this case, the first parameter "this" is also probably redundant. The old PrototypeJS curry() would have been the least redundant solution: movePlayer.curry("north")



It would be nice if they had called it curry() or at least created a curry() alias.


Nice, hadn't seen that before, looks like it was just added early this year.




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

Search: