Skip to content

Instantly share code, notes, and snippets.

@zhanhongtao
Created September 5, 2013 04:01
Show Gist options
  • Save zhanhongtao/6445945 to your computer and use it in GitHub Desktop.
Save zhanhongtao/6445945 to your computer and use it in GitHub Desktop.
partial
// partial
;(function() {
var BASE_FONT_SIZE = 100;
var zoom = partial(function( a, b ) {
return a + b;
}, BASE_FONT_SIZE );
var result = zoom( -30 ); // 70
var result2 = zoom( 50 ); // 150
console.assert( result === 70 );
console.assert( result2 === 150 );
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment