     }
 }
 
-public func forcomp<T,U,V>(f:Try<T>, g:Try<U>, h:Try<V>, filter:(T,U,V) -> Bool, apply:(T,U,V) -> Void) {
+public func forcomp<T,U,V>(f: Try<T>, g: Try<U>, h: Try<V>, filter: (T,U,V) -> Bool, apply: (T,U,V) -> Void) {
     f.foreach {fvalue in
         g.foreach {gvalue in
             h.filter{hvalue in

        return future
    }
    
    public func recoverWith(recovery:NSError -> Future<T>) -> FutureStream<T> {
        return self.recoverWith(self.defaultExecutionContext, recovery:recovery)
    }
    
    public func recoverWith(executionContext:ExecutionContext, recovery:NSError -> Future<T>) -> FutureStream<T> {
        let future = FutureStream<T>(capacity:self.capacity)
        self.onComplete(executionContext) {result in
            switch result {
            case .Success(let value):
                future.success(value)
            case .Failure(let error):
                future.completeWith(executionContext, future:recovery(error))
            }
        }
        return future
    }
    
    internal func completeWith(future:Future<T>) {
        self.completeWith(self.defaultExecutionContext, future:future)
    }
    
    internal func completeWith(executionContext:ExecutionContext, future:Future<T>) {
        future.onComplete(executionContext) {result in
            self.complete(result)
        }
    }
    
    internal func addFuture(future:Future<T>) {
        if let capacity = self.capacity {
            if self.futures.count >= capacity {
                self.futures.removeAtIndex(0)
            }
        }
        self.futures.append(future)
    }
    
}


            self.saveCompletes.removeAll()
        }
    }

    internal func completeWith(future: Future<T>) {
        self.completeWith(self.defaultExecutionContext, future: future)
    }

    internal func completeWith(executionContext: ExecutionContext, future: Future<T>) {
        if self.completed == false {
            future.onComplete(executionContext) { result in
                self.complete(result)
            }
        }
    }

    internal func success(value:T) {
        self.complete(Try(value))
    }

    internal func failure(error:NSError) {
        self.complete(Try<T>(error))
    }

    internal func completeWith(stream: FutureStream<T>) {
        self.completeWith(self.defaultExecutionContext, stream: stream)
    }

    internal func completeWith(executionContext: ExecutionContext, stream: FutureStream<T>) {
        stream.onComplete(executionContext) { result in
            self.complete(result)
        }
    }

    // MARK: Callbacks
    public func onComplete(executionContext: ExecutionContext, complete: Try<T> -> Void) -> Void {
        self.futureQueue.sync {
            let savedCompletion : OnComplete = { result in
                executionContext.execute {
                    complete(result)
                }
