Assignment: curried function with => notation
Write a function named plus that returns the sum of its arguments, where the arguments are being passed in curried style, such that for all numbers x and y, plus(x)(y) === x + y.
Use the => notation exclusively, i.e. no function keyword.
Solution
const plus = x => y => x + y;Your solution will be tested against:
const x_ = Math.random();
const y_ = Math.random();
const plus3 = plus(3);
plus(x_)(y_) === x_ + y_ && plus3(y_) === 3 + y_;