 extension Deferred {
     public func bindQueue<U>(queue: dispatch_queue_t, f: T -> Deferred<U>) -> Deferred<U> {
         let d = Deferred<U>()
-        self.uponQueue(queue) {
-            f($0).uponQueue(queue) {
+        upon(queue) {
+            f($0).upon(queue) {
                 d.fill($0)
             }
         }

        return protected.withReadLock { $0.protectedValue }
    }

    public func uponQueue(queue: dispatch_queue_t, block: T -> ()) {
        let maybeValue: T? = protected.withWriteLock{ data in
            if data.protectedValue == nil {
                data.uponBlocks.append( (queue, block) )
            }
            return data.protectedValue
        }
        if let value = maybeValue {
            dispatch_async(queue) { block(value) }
        }
    }
}

}

extension Deferred {
    public func bind<U>(f: T -> Deferred<U>) -> Deferred<U> {
        return bindQueue(defaultQueue, f: f)
    }
