Promises Consensus

Juan Ignacio Dopazo dopazo.juan at
Thu Aug 1 10:52:13 PDT 2013

2013/8/1 Mark S. Miller <erights at>

> On the input side of .then and .flatMap, no.
> On the output side of both .then and .flatMap, depending on what you mean
> by "branding", yes. If .flatMap's callback returns a non-promise the
> promise it already returned gets rejected. If .then's callback returns a
> non-promise, the promise it already returned accepts that non-promise.
> That's why I included assimilation in the mix. If then() deep flattens
promises there's no difference with assimilation of thenables. Only
flatMap() could need to know if something is a "true promise" or not, and
even then it could still be more useful for flatMap() to duck type
(composition with other flatMappable objects).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list