by nothrabannosir · 10y ago · 0 comments
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:
function f(param) {
return curry(32, param);
}
(or is this to highlight the difference between currying and partial function application?) let test_curry x y = x + y + x
You get the expected output function f(param) {
return test_curry(32, param);
}