waldemar at google.com
Thu Oct 15 20:15:23 UTC 2015
On 10/15/2015 12:58, Yongxu Ren wrote:
> Sorry I actually didn’t mean to use this for currying
> const add = a => b => a + b;
> This was directly copied from Mark's example, I was thinking about making the non-nested arrow functional.
> My idea is if you define
> const add = (a,b) => a + b;
> you will be able to use either ```add(a,b)``` or ```add(a)(b)```
Alexander's point still stands. This would break compatibility, which makes it a non-starter. It also becomes dubious with variable numbers of parameters.
More information about the es-discuss