Skip to content

Instantly share code, notes, and snippets.

@DanShappir
Created November 1, 2020 09:55
Show Gist options
  • Select an option

  • Save DanShappir/183ff87e78ce6b6f2fdf85b1470aab5a to your computer and use it in GitHub Desktop.

Select an option

Save DanShappir/183ff87e78ce6b6f2fdf85b1470aab5a to your computer and use it in GitHub Desktop.

Revisions

  1. DanShappir created this gist Nov 1, 2020.
    3 changes: 3 additions & 0 deletions pipe_pipe.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    function pipe(arg, ...fns) {
    return fns.reduce((v, fn) => fn(v), arg);
    }