A functional utility for doing partial application in JavaScript