Pipe functions - 30 seconds of code

PHOTO EMBED

Wed Aug 24 2022 02:45:02 GMT+0000 (Coordinated Universal Time)

Saved by @camtonguyen #javascript

const pipeFunctions = (...fns) =>
  fns.reduce((f, g) => (...args) => g(f(...args)));
content_copyCOPY

https://www.30secondsofcode.org/js/s/pipe-functions