Quildreen Motta (2014-01-28T20:21:24.000Z)
domenic at domenicdenicola.com (2014-02-04T16:09:11.812Z)
So, if I understand correctly, it basically boils down to: ``` Promise.resolve :: a → Promise(a) Promise.cast :: a → Promise(a) Promise.cast :: Promise(a) → Promise(a) ``` But right now we'll only get `.then`, so transformations with nested promises will flatMap automatically: ``` Promise.then :: (Promise(a)) => ((a → MaybePromise(b), (a → MaybePromise(b)) Promise.then :: (Promise(Promise(a))) => ((a → MaybePromise(b), (a → MaybePromise(b)) ``` 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.