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.
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.