Skip to content

Instantly share code, notes, and snippets.

@bliotti
Created May 23, 2018 13:10
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 bliotti/e50225793b44d0525e9c37874e89974c to your computer and use it in GitHub Desktop.
Save bliotti/e50225793b44d0525e9c37874e89974c to your computer and use it in GitHub Desktop.
const mult = (x, y) => x * y;
const mult3 = (x, y, z) => x * y * z;
const adder = (x, y) => x + y;
const add3 = (x, y, z) => x + y + z;
const isOdd = x => x % 2 !== 0;
const isEven = x => x % 2 === 0;
const spacers = (str, dlim) => str.split(dlim);
const fadd = n => y => n + y;
const fmult = n => y => n * y;
const fadder4 = w => x => y => z => w + x + y + z;
console.log(mult(3, 2));
console.log(mult3(3, 2, 3));
console.log(adder(3, 2));
console.log(add3(3, 2, 4));
console.log(isOdd(3));
console.log(isEven(2));
console.log(mult(3, 2));
console.log(mult(3, 2));
console.log(mult(3, 2));
console.log(fadder4(2)(3)(4)(5));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment