Skip to content

Instantly share code, notes, and snippets.

@afshin
Created March 13, 2012 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afshin/2030387 to your computer and use it in GitHub Desktop.
Save afshin/2030387 to your computer and use it in GitHub Desktop.
Partial Application in JavaScript Revisited 5
(function () {
var delay = setTimeout.partial(undefined, 10);
delay(function () {
console.log('A call to this function will be temporarily delayed.');
});
// logs 'A call to this function will be temporarily delayed.'
delay(function () {console.log('Some other message.');});
// logs 'Some other message.'
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment