great explanation thank you. so if i am following, for a promise to be monadic it would have to change the behavior of its .then method:
(lazy): does not evaluate until .then is appended
cb returns a promise: Promise<Promise<TInnerResolve>>
but a cb returning a value i can’t picture because .then has to source from a promise. meaning the value (Mb?) would never be available at the outer scope, only in the closure.
as an aside how would a promise (an asynchronous task representation) look in fp?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
great explanation thank you. so if i am following, for a promise to be monadic it would have to change the behavior of its .then method:
Promise<Promise<TInnerResolve>>
but a cb returning a value i can’t picture because .then has to source from a promise. meaning the value (Mb?) would never be available at the outer scope, only in the closure.
as an aside how would a promise (an asynchronous task representation) look in fp?