Hacker News new | past | comments | ask | show | jobs | submit login

However , to pass a constant I could use default parameter value.



It's the function definition that's responsible for defining default parameter.

It's the function caller that's responsible for that parameter with partial application / currying / closure.

It doesn't matter if you develop both, but if you use a library you'll need partial application to define default parameter.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: