     }
     
     public func flatMap<U>(f: T -> Promise<U>) -> Promise<U> {
-        return Promise<U>({ resolve in self.`defer` { resolve(f($0)) } })
+        return Promise<U>({ resolve in self.reserve { resolve(f($0)) } })
     }
     
     public func apply<U>(f: Promise<T -> U>) -> Promise<U> {

    }
    
    private func resolve(promise: Promise<T>) {
        promise.`defer` {
            if self.value != nil {
                return
            }

        }
    }
    
    private func reserve(handler: T -> ()) {
        if let value = self.value {
            handler(value)
        } else {
