                 return self.delay(delay).then({
                     return retry(count: count-1, delay: delay, generate: generate)
                 })
-            }).then({ value in
-                fulfill(value)
-            }).onFailure({ error in
-                reject(error)
-            })
+            }).then(fulfill).onFailure(reject)
         })
     }
     

    
    func recover(recovery: (ErrorType) -> Promise<Value>) -> Promise<Value> {
        return Promise(work: { fulfill, reject in
            self.then({ value in
                fulfill(value)
            }).onFailure({ error in
                recovery(error).then({ value in
                    fulfill(value)
                }).onFailure({ error in
                    reject(error)
                })
            })
        })
    }

        return Promise<T>(work: { fulfill, reject in
            guard !promises.isEmpty else { fatalError() }
            for promise in promises {
                promise.then(fulfill).onFailure(reject)
            }
        })
    }
