2013/8/1 Mark S. Miller <[email protected]>
> 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).
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

