News for hackers. Stuff that matters.
Re:Partial Application and Lambda Parameter Syntax for JavaS... by ponkin on Wednesday January 31, 2018 @03:53AM (#16272481)
You can not use partial application with that. for example const add = x=>y=>x+y

can be partialy applied like the following const add3 = add(3) // this is also a function

Re:Partial Application and Lambda Parameter Syntax for JavaS... by masklinn on Wednesday January 31, 2018 @05:22AM (#16272853)
> You can not use partial application with that.

You can:

    const add3 = add.bind(null, 3)
Re:Partial Application and Lambda Parameter Syntax for JavaS... by a-saleh on Wednesday January 31, 2018 @11:27AM (#16275051)
I still like currying better, but I just might be weird like that :-)
Re:Partial Application and Lambda Parameter Syntax for JavaS... by masklinn on Wednesday January 31, 2018 @11:36AM (#16275122)
I only asserted that you could partially apply regular functions. But I don't think currying looks or feels nice in Javascript.

Proper curried languages are definitely better suited for partial application though.

Re:Partial Application and Lambda Parameter Syntax for JavaS... by mwilliaams on Wednesday January 31, 2018 @02:16PM (#16276654)
You could use default parameters in this case.

const add = (a, b=0) => {return a+b}