This is probably a problem because how LS compiles to AST.
I have been checking and it produces the same AST for normal and curried functions, which is probably what confuses your compiler.
Here is a small example, the following code produces:
add = (a, b) --> a + b
console.log add 3 4
let add;
add = function (a, b) {
return a + b;
};
console.log(add(3, 4));
As you can see, the curry function is left behind. Of course this can be fixed by manually currying the function, which is not too bad
add = (a) -> (b) -> a + b
console.log add 3 <| 4
In fact I really like this because it looks a lot like HMS signatures ( I would love to remove the parens, but that is another story).
Hello,
This is probably a problem because how LS compiles to AST. I have been checking and it produces the same AST for normal and curried functions, which is probably what confuses your compiler. Here is a small example, the following code produces:
As you can see, the curry function is left behind. Of course this can be fixed by manually currying the function, which is not too bad
In fact I really like this because it looks a lot like HMS signatures ( I would love to remove the parens, but that is another story).
In any case, I think it's worth mentioning