From 56afea119a13c6db0bd2762ed8631d9f232a8e67 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Fri, 3 Jan 2020 08:47:07 +0100 Subject: [PATCH] Reorder parameters if compose so that it uses the natural mathematical sense --- fun.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fun.js b/fun.js index 440e92d..b18d6ef 100644 --- a/fun.js +++ b/fun.js @@ -21,7 +21,7 @@ function Fun() { function compose(f, g) { return function() { - return g(f.apply(null, arguments)); + return f(g.apply(null, arguments)); }; }