On 28 January 2014 21:27, Andreas Rossberg <[email protected]> wrote:

> On 28 January 2014 21:21, Quildreen Motta <[email protected]> wrote:
>

> > But later, once `flatMap` is introduced, you'll be able to deal with
> nested
> > promises without breaking parametricity:
> >
> > Promise.flatMap :: (Promise(a)) => (a → Promise(b))
> >
> > If that's correct, I don't see any use cases for Promise.resolve right
> now,
> > unless a library where to provide a corresponding unspecified `flatMap`
> > implementation.
>
> The V8 implementation provides it under the name `chain', with the
> obvious semantics.


Considering that the fantasy-land specification uses the `chain` name as
well, this is really neat.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to