     return p.future
 }
 
+/**
+
+    Creates a new Future by filtering the value of the current Future with a predicate `p`
+
+    :param: fx Future
+    :param: p Predicate function
+    :param: ec Execution context of `p`
+
+    :returns: A new Future with value or nil
+
+*/
 public func filter<F: FutureType>(fx: F, p: F.SuccessType -> Bool)(_ ec: ExecutionContextType) -> Future<F.SuccessType?, F.ErrorType> {
     return map(fx) { x in p(x) ? x : nil }(ec)
 }
 
+/**
+
+    Zips two future together and returns a new Future which success result contains a tuple of two elements
+
+    :param: fa First future
+    :param: fb Second future
+
+    :returns: Future with resuls of two futures
+
+*/
 public func zip<F: FutureType, T: FutureType where F.ErrorType == T.ErrorType>(fa: F, fb: T) -> Future<(F.SuccessType, T.SuccessType), F.ErrorType> {
     
     let ec = ExecutionContext.DefaultPureOperationContext

    }
}

public func traverse<S: SequenceType, F: FutureType>(xs: S, f: S.Generator.Element -> F)(_ ec: ExecutionContextType) -> Future<[F.SuccessType], F.ErrorType> {
    return reduce(map(xs, f), []) { $0 + [$1] }(ec)
}

public func sequence<S: SequenceType where S.Generator.Element: FutureType>(fxs: S) -> Future<[S.Generator.Element.SuccessType], S.Generator.Element.ErrorType> {
    return traverse(fxs, id)(ExecutionContext.DefaultPureOperationContext)
}

public func recover<F: FutureType>(fx: F, r: F.ErrorType -> F.SuccessType)(_ ec: ExecutionContextType) -> Future<F.SuccessType, F.ErrorType> {
    let p = Promise<F.SuccessType, F.ErrorType>()
    fx.onComplete(ec) {

    return p.future
}

/**

    Creates a new future by applying a function `f` to the success result of this future.

    :param: fx Future
    :param: f Function that will be applied to success result of `fx`
    :param: ec Execution context of `f`

    :returns: a new Future

*/
public func map<F: FutureType, T>(fx: F, f: F.SuccessType -> T)(_ ec: ExecutionContextType) -> Future<T, F.ErrorType> {
    return transform(fx, f, id)(ec)
}

/**

    Creates a new future by applying the 's' function to the successful result of this future, or the 'e' function to the failed result.

    :param: fx Future
    :param: s Function that will be applied to success result of `fx`
    :param: e Function that will be applied to failed result of `fx`
    :param: ec Execution context of `s` and `e` functions

    :returns: a new Future
*/
public func transform<F: FutureType, S, E>(fx: F, s: F.SuccessType -> S, e: F.ErrorType -> E)(_ ec: ExecutionContextType) -> Future<S, E> {
    let p = Promise<S, E>()
    fx.onComplete(ec) {
