On Fri, Feb 7, 2014 at 8:20 AM, Jonathan Bond-Caron
<jbo...@gdesolutions.com> wrote:
> On Fri Feb 7 06:50 AM, Anne van Kesteren wrote:
>> On Fri, Feb 7, 2014 at 12:45 PM, Yutaka Hirano <yhir...@chromium.org> wrote:
>> > Sorry for knowing little about ES "consensus", is this the final decision?
>> > Will you change it again?
>>
>> Yeah, some clarity would be nice.
>
> From a user perspective, can someone explain what chain() does?

.chain returns what is directly inside the promise, without doing any
additional magic.  This is different from .then, which "flattens"
promises.

For a more concrete example, assume that "x" is a
Promise<Promise<integer>>.  That is, it's a promise, holding a
promise, holding an integer.  x.chain(arg=>"arg is a
Promise<Integer>"), x.then(arg=>"arg is an Integer").

~TJ
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to