Skip to content

Commit

Permalink
Optimize >> and << in compiled JS
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmengels committed Jul 15, 2024
1 parent 2acc9c7 commit 301d083
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/optimize-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,30 @@ const performanceReplacements = [
$elm$core$Set$empty,
set);
});`
},
{
target: `var $elm$core$Basics$composeL = F3(
function (g, f, x) {
return g(
f(x));
});`,
replacement: `var $elm$core$Basics$composeL = F2(function $elm$core$Basics$composeL$fn(g, f) {
return function(x) {
return g(f(x));
};
});`
},
{
target: `var $elm$core$Basics$composeR = F3(
function (f, g, x) {
return g(
f(x));
});`,
replacement: `var $elm$core$Basics$composeR = F2(function $elm$core$Basics$composeR$fn(f, g) {
return function(x) {
return g(f(x));
};
});`
}
];

Expand Down

0 comments on commit 301d083

Please sign in to comment.