Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.