function something(a, b, c){
  return function(){/* code that uses a, b, and c */}
}

How should I call this type of function?

comments (single view)

What does this accomplish that this can’t?

function something2(a, b, c) {
   /* code that uses a, b, and c */
}

// use something2.bind(null, a, b, c) instead of something(a, b, c)

If it has its own use, then I think it could be called a “pseudo-bound function”.

I don’t think that’s how you’re supposed to use bind

The feature exists, therefore it exists

I can mix tabs and spaces when indenting on Python, yet we’re told not to do it.

And that’s for a reason. I can’t think of any reasons why using bind in this way would be a bad idea. If you have some, list all of them.

I can mix tabs and spaces when indenting on Python, yet we’re told not to do it.

s/we’re/we’ve been

View all comments