Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

kinda already possible:

const bind1st = (f, x) => (y) => f(x, y) const addTwo = bind1st(add, 2) let x = addTwo(5) // 7

it can get a little confusing unless one's used to point-free programming:

const twostep = bind1st(bind1st, bind1st) // YMMV



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

Search: