3 ms·
How is this an improvement? It looks basically equivalent but more confusing to me.
by jstanley 14y ago
How is this an improvement?
It looks basically equivalent but more confusing to me.
- xhrpost 14y agoIt'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")
- k3n 14y agoThere's also partial(): 1. http://documentcloud.github.io/underscore/#partial http://documentcloud.github.io/underscore/#partial