         return p.future
     }
     
-    public func flatMap<U>(f: T -> Result<U>) -> Future<U> {
-        return self.flatMap(context: executionContextForCurrentContext(), f: f)
-    }
-    
-    public func flatMap<U>(context c: ExecutionContext, f: T -> Result<U>) -> Future<U> {
+    public func flatMap<U>(context c: ExecutionContext = executionContextForCurrentContext(), f: T -> Result<U>) -> Future<U> {
         return self.flatMap(context: c) { value in
             Future.completed(f(value))
         }

        return self
    }
    
    public func onSuccess(callback: SuccessCallback) -> Future<T> {
        return self.onSuccess(context: executionContextForCurrentContext(), callback: callback)
    }
    
    public func onSuccess(context c: ExecutionContext, callback: SuccessCallback) -> Future<T> {
        self.onComplete(context: c) { result in
            switch result {
            case .Success(let val):

 */
public extension Future {

    public func flatMap<U>(context c: ExecutionContext = executionContextForCurrentContext(), f: T -> Future<U>) -> Future<U> {
        let p: Promise<U> = Promise()
        self.onComplete(context: c) { res in
            switch (res) {
