Looks like it's just an optimization. If you change to
let test_curry x y = x + y + x
You get the expected output function f(param) {
return test_curry(32, param);
}
Re:Announcing BuckleScript 1.0
by hongbo_zhang on Wednesday August 31, 2016 @06:57PM
(#12402095)
btw, we also have native uncurried calling convention support to make callback even more efficient
I'm surprised by this one:
https://bloomberg.github.io/bucklescript/js-demo/#Curry_Opti...
Why doesn't it actually curry? Impressive output, don't get me wrong. But given how native and idiomatic currying is in Javascript, and how much trouble I'd expect this to have taken to implement... is there a specific reason for this? Just curious.
Anyway, again: very impressive. Thanks.
EDIT clarification: I expected:
(or is this to highlight the difference between currying and partial function application?)