about summary refs log tree commit diff stats
path: root/js/pipe.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/pipe.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
class='alt'>
d737f1a ^





1167e12 ^
d737f1a ^
1167e12 ^

d737f1a ^

1167e12 ^

d737f1a ^




4e68c5a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40