mattbierner / khepri

ECMAScript derived programming language
http://khepri-lang.com/
MIT License
67 stars 3 forks source link

Better apply optimization #121

Open mattbierner opened 10 years ago

mattbierner commented 10 years ago
var f := \x y z -> x + y + y;
f <<| [1, 2, 3, 4];

Current:

var f = (function(x, y, z) {
    return ((x + y) + y);
}),
    y = [1, 2, 3, 4];
f.apply(null, y);

Target (after inlining):

6;