about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/pipe.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/pipe.js b/js/pipe.js
index 69ccae3..ace5fb9 100644
--- a/js/pipe.js
+++ b/js/pipe.js
@@ -1,2 +1,6 @@
 const pipe = (...args) => args.reduce((acc, el) => el(acc));
 
+/* alt implementation
+const pipe = (...fns) => (initialValue) =>
+  fns.reduce((acc, fn) => fn(acc), initialValue);
+*/
\ No newline at end of file