{ ($0, Resolver($0.box)) }(Promise<T>(.pending)):闭包的定义与执行合一

    public class func pending() -> (promise: Promise<T>, resolver: Resolver<T>) {

        return { ($0, Resolver($0.box)) }(Promise<T>(.pending))

    }

posted @ 2018-11-29 15:41  zzfx  阅读(238)  评论(0编辑  收藏  举报