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

Instead of

const x = await promise1(someArgs); const y = await promise2(someFunction(x));

we do

function processor(monad, args) { return monad.unit(promise1(args)).map(someFunction).then(promise2) }

That's all about monad.




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

Search: