         }
     }
 
+    /// Resolves the given future with the result of the current future.
+    private func cascade(_ future: Future) {
+        observe(success: future.succeed, failure: future.fail)
+    }
+
     /// Returns a new future which callbacks are observed on the given queue. The
     /// default queue is `.main` queue.
     ///

    ///
    /// - returns: A future with a result of the future returned by the closure.
    public func flatMap<NewValue>(_ closure: @escaping (Value) -> Future<NewValue, Error>) -> Future<NewValue, Error> {
        return Future<NewValue, Error>(queue: queue) { succeed, fail in
            observe(success: { value in
                closure(value).observe(success: succeed, failure: fail)
            }, failure: fail)
        }
    }

    /// The closure executes asynchronously when the future fails.

        if queue === self.queue {
            return self // We're already on that queue
        }
        let future = Future(queue: queue)
        cascade(future)
        return future
    }

    // MARK: Map
