Currying in JavaScript with bind()