Created
June 24, 2017 03:06
-
-
Save lubien/4a5e9b8142149765fb39fcc0746aab11 to your computer and use it in GitHub Desktop.
Meeting Lambda #12: Curry or Partial? - Max 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
// if the other argument is lower than 0, return 0 | |
const atLeastZero = Math.max.bind(null, 0) | |
console.log(atLeastZero(10)) // 10 | |
console.log(atLeastZero(-10)) // 0 | |
console.log(atLeastZero(0)) // 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment