catch
doesn't fit your needs? it's typically placed somewhere at the end of the chain, but can also be used in the middle like here: https://github.com/google/promises/blob/master/Tests/PromisesTests/Promise%2BCatchTests.swift#L211
tap
in PromiseKit also creates a new promise (https://github.com/mxcl/PromiseKit/blob/aea48ea1855f5d82e2dffa6027afce3aab8f3dd7/Sources/Thenable.swift#L259), or you mean something different?
return .value(document)
I believe, using return document
doesn't work and I have to add Promises.Promise()
, why is that?
.map { try foobar(); return true }
, using Promises I did it with .then {}
, like shown at https://gist.github.com/penso/9c695279e4101fed5dc74c969d5399bf ligne 11. Is that the good way?