You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to use a = -->, but is this considered expected functionality? I was just reading the code and saw that you can name a function using the label syntax and saw that currying doesn't work with this. If this is expected, should the parser maybe throw an error when this is occurred?
Activity
vendethiel commentedon Jul 9, 2015
it's mostly because "labels" attach to "blocks", nothing else. (a for, a function, etc). You ought to use
a = -->orfor curried functions anyway ;-).
kkirby commentedon Jul 9, 2015
I agree to use
a = -->, but is this considered expected functionality? I was just reading the code and saw that you can name a function using the label syntax and saw that currying doesn't work with this. If this is expected, should the parser maybe throw an error when this is occurred?waynedpj commentedon Sep 18, 2015
also having an issue with creating a curried named function as suggested above ala
which compiles to a bound named function w/ 1.4.0 as expected
all the other combinations i have tried (e.g.
--function named,-function named) are giving compilation errors or not currying the named function.perhaps it is not possible to create a curried named function as they are constants?
thanks.
igl commentedon Sep 19, 2015
The problem is that you can't.
Wrapping a function statement in Javascript will make it a function expression.
Same as:
The only fix i can think of would be to wrap the body of the function and not the declaration.
Throw compile-time error if a label is used with a curried function (r…