Skip to content

Commit 301d083

Browse files
committed
Optimize >> and << in compiled JS
1 parent 2acc9c7 commit 301d083

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/optimize-js.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,30 @@ const performanceReplacements = [
386386
$elm$core$Set$empty,
387387
set);
388388
});`
389+
},
390+
{
391+
target: `var $elm$core$Basics$composeL = F3(
392+
function (g, f, x) {
393+
return g(
394+
f(x));
395+
});`,
396+
replacement: `var $elm$core$Basics$composeL = F2(function $elm$core$Basics$composeL$fn(g, f) {
397+
return function(x) {
398+
return g(f(x));
399+
};
400+
});`
401+
},
402+
{
403+
target: `var $elm$core$Basics$composeR = F3(
404+
function (f, g, x) {
405+
return g(
406+
f(x));
407+
});`,
408+
replacement: `var $elm$core$Basics$composeR = F2(function $elm$core$Basics$composeR$fn(f, g) {
409+
return function(x) {
410+
return g(f(x));
411+
};
412+
});`
389413
}
390414
];
391415

0 commit comments

Comments
 (0)