Created
September 5, 2013 04:01
-
-
Save zhanhongtao/6445945 to your computer and use it in GitHub Desktop.
partial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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