Skip to content

Instantly share code, notes, and snippets.

@json2d
Last active November 16, 2017 17:57
Show Gist options
  • Save json2d/90fb7df721ba8787265e7a7e76c57087 to your computer and use it in GitHub Desktop.
Save json2d/90fb7df721ba8787265e7a7e76c57087 to your computer and use it in GitHub Desktop.
What is the name for the class of functions designed to be bound dynamically when called?

ES7 function bind syntax will add the :: operator for working with these kind of functions:

/* ES7 */
import { map, takeWhile, forEach } from "iterlib";

getPlayers()
::map(x => x.character())
::takeWhile(x => x.strength > 100)
::forEach(x => console.log(x));

These are being referred to as virtual methods, which seems like a misnomer when considering the oop definition.

Is there a proper name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment