     func completeWith(val: T) {
         self.completeWith({ Try<T>(success: val) })
     }
-    
+
     /**
     * :param val - error NSerror.
     *

}

public class Future<T> {
    
    private var f: (() -> Try<T>)? = nil
    private var futureValue: Try<T>?
    private var completionF: ((Try<T>) -> ())?
    private var mappedCompletionF:((Try<T>) -> ())?
    
    private var bindCheck: BindCheck = BindCheck.BoolCheck({ true })
    
    private var interalCompletionHandler:(() -> ())?

    private var successF: ((T) -> ())?
    private var recoverF: ((NSError) -> Future<T>)?
    private var mappedRecoverF: ((NSError) -> Try<T>)?
    private var recoverFilter: ((NSError) -> Bool) = { err in true }
    
    private var failureF: ((NSError) -> ())?
    private var signals: [Signal] = []
    
    let operationQueue: NSOperationQueue
    let callbackQueue: NSOperationQueue
    
    public init(_ f: () -> Try<T>, operationQueue: NSOperationQueue = defaultFutureQueue, callbackQueue:NSOperationQueue = NSOperationQueue.mainQueue()) {
        self.operationQueue = operationQueue
        self.callbackQueue = callbackQueue
        self.completeWith(f)
    }
    
    public init(operationQueue: NSOperationQueue = defaultFutureQueue, callbackQueue:NSOperationQueue = NSOperationQueue.mainQueue()) {
        self.operationQueue = operationQueue
        self.callbackQueue = callbackQueue
    }
    
    public var signal: Signal {
        let signal = Signal()
        if futureValue == nil {

            switch self.futureValue!.toTuple {
            case (let val, _) where val != nil:
                signal.complete(TryStatus.Success, self.callbackQueue)

            case (_, let error):
                signal.complete(TryStatus.Failure(error!), self.callbackQueue)
            }
        }
        return signal
    }

    /**
     * :param f - A zero argument function that returns a T.
     *
