about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2023-07-18 10:23:54 -0400
committerelioat <hi@eli.li>2023-07-18 10:23:54 -0400
commit573b63ff95c85c932c55e0c8888bffdc6704ed1a (patch)
treecf09b9b2f324f8d3cd8a5b492f556c61e6e5b66c /js
parenta937b952930728ada58dfa2ee7bbf6082d92b2fd (diff)
downloadtour-573b63ff95c85c932c55e0c8888bffdc6704ed1a.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/compose.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/compose.js b/js/compose.js
new file mode 100644
index 0000000..a414e3c
--- /dev/null
+++ b/js/compose.js
@@ -0,0 +1 @@
+const compose = (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0];