js-vault icon indicating copy to clipboard operation
js-vault copied to clipboard

Implement the pipe function

Open nitish24p opened this issue 5 years ago • 5 comments

function pipe() {
  // Implement code here
}

const double = (x) => x * 2;
const square = (x) => x * x;
const cube = (x) => x ** 3;

// const value = pipe(double, cube, square)(2); // output 4096
// console.log(value);

Keep the pipe function as generic as possible..

nitish24p avatar Oct 05 '20 08:10 nitish24p

Hey!! I'd like to work on this!!

gaurav219 avatar Oct 05 '20 09:10 gaurav219

Sure

nitish24p avatar Oct 05 '20 09:10 nitish24p

Hey!! According to the new rules you'd also have to add "hacktoberfest" on topics of this repository!!

gaurav219 avatar Oct 05 '20 09:10 gaurav219

Also, I can't seem to find this piece of code and where to implement??

gaurav219 avatar Oct 05 '20 09:10 gaurav219

you can check the readme

nitish24p avatar Oct 05 '20 11:10 nitish24p