2 ms·
Not exactly, unless the fulfilledHandler returns a promise. The examples didn't seem to have that requirement. If fulfilledHandler is a regular function, then
by Evbn 14y ago
Not exactly, unless the fulfilledHandler returns a promise. The examples didn't seem to have that requirement.
If fulfilledHandler is a regular function, then then() is just Functor's fmap.
If fulfilledHandler is allowed to be either variant, then you can imagine then() as applying an implicit return when needed, which makes the types a bit less clear