Compose & pipeOn this pageCompose & pipe Compose const compose = (...functions) => (input) => functions.reduceRight((acc, fn) => fn(acc), input); Pipe const pipe = (...functions) => (input) => functions.reduce((acc, fn) => fn(acc), input);