Skip to content

Instantly share code, notes, and snippets.

@njlr
Created February 26, 2018 16:31
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 njlr/d89d164fe8175277a5260e08ea2cbced to your computer and use it in GitHub Desktop.
Save njlr/d89d164fe8175277a5260e08ea2cbced to your computer and use it in GitHub Desktop.
// There is an optimization opportunity when using a currying-style in JavaScript.
// For example, this...
export const and = x => y => x && !!y;
// Might become...
export const and = x => {
if (x) {
return y => !!y;
}
return _ => false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment