RxJS Pipe Method


const pipe = (...fns) => initialVal => fns.reduce((g,f) => f(g), initialVal);

is equivalent to


const pipe = (...fns){
    return (initalValue) => {
        return fns.reduce(
            (g,f) => {
                 //reducer logic
                 return g;
             },
         initialVal)
     }
}

More on Medium

Leave a Reply