Skip to content

Instantly share code, notes, and snippets.

@lubien
Created June 24, 2017 03:06
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 lubien/4a5e9b8142149765fb39fcc0746aab11 to your computer and use it in GitHub Desktop.
Save lubien/4a5e9b8142149765fb39fcc0746aab11 to your computer and use it in GitHub Desktop.
Meeting Lambda #12: Curry or Partial? - Max Partial
// 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